Broken path in postfix start script

Asked by David Kågedal

In intrepid postfix 2.5.5-1, /etc/init.d/postfix contains this:

                cd $(postconf -h queue_directory)

                if [ "X$smtp_use_tls" = "Xyes" -o "X$smtpd_use_tls" = "Xyes" ]; then
                    if [ -f "/etc/ssl/certs/ca-certificates.crt" ]; then
                        mkdir -p etc/ssl/certs
                        cp /etc/ssl/certs/ca-certificates.crt etc/ssl/certs/
                    fi
                fi

As you can see, the mkdir command is missing the leading slash in the path. This makes it fail with "mkdir: cannot create directory `etc/ssl': Permission denied".

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
David Kågedal
Solved:
Last query:
Last reply:
Revision history for this message
David Kågedal (dkagedal) said :
#1

Sorry, I'm a bit confused. It's supposed to lack a slash,

postconf -h queue_directory returns /var/spool/postfix and it has an empty etc subdirectory:

drwxr-xr-x 2 root root 4096 2008-09-03 16:34 /var/spool/postfix/etc/

Revision history for this message
David Kågedal (dkagedal) said :
#2

I messed up in some way when trying to restore an old configuration. When starting over and doing it more carefully, it works fine.