shell scripting error (qmail related)
Gezim Hoxha
gezimetc at telus.net
Mon Sep 19 03:32:09 UTC 2005
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
I know the first two are invalid because I did try to run "id -u qmaild"
and returned a number, so does the second command. Same thing applies to
the "head" command and _no_ there isn't too few arguments in line 6 an
so on.
Anyway, I'm a little frustrated and I would be grateful if someone help
me out.
Thank you,
-Gezim
More information about the users
mailing list