Re: shell scripting error (qmail related)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gezim Hoxha wrote:
Hi all,

I was trying to install qmail ( http://cr.yp.to/qmail.html ), everything
went fine until I had to run the following script:

#!/bin/sh
QMAILDUID=`id −u qmaild`
NOFILESGID=`id −g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head −1 /var/qmail/control/me`
if [ −z "$QMAILDUID" −o −z "$NOFILESGID" −o −z "$MAXSMTPD" −o −z
"$LOCAL" ]; then
    echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
    echo /var/qmail/supervise/qmail−smtpd/run
    exit 1
fi
if [ ! −f /var/qmail/control/rcpthosts ]; then
    echo "No /var/qmail/control/rcpthosts!"
    echo "Refusing to start SMTP listener because it'll create an open
relay"
    exit 1
fi
exec /usr/local/bin/softlimit −m 2000000 \
    /usr/local/bin/tcpserver −v −R −l "$LOCAL" −x /etc/tcp.smtp.cdb −c
"$MAXSMTPD" \
        −u "$QMAILDUID" −g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail
−smtpd 2>&1

Now the errors I'm getting are:

Try `id --help' for more information.
Try `id --help' for more information.
head: cannot open `−1' for reading: No such file or directory
./run: line 6: [: too many arguments
./run: line 11: [: −f: unary operator expected
softlimit: fatal: unable to run −m: file does not exist

When I cut and paste the above script into 'od -c', I see that the
'-' characters are not simple ASCII characters but a 3-byte sequence
"\342\210\222" in octal.  That explains what you are seeing.  How
on Earth they got that way is another question altogether.

--
Bob Nichols         Yes, "NOSPAM" is really part of my email address.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux