-
October 6th, 2001, 02:55 PM
#1
Ok. Not a security question but..
A script, for qmail, I was working on for one of my linux boxes always gives the error:
scriptname: line 108: syntax error: unexpected end of file
Line 108 is the last line of the script and I've set it up exactly as I've seen but it always gives this.
The syntax for the rest of the script is correct and works on Solaris and RH ok.
Anyone got any idears?
-
October 6th, 2001, 03:27 PM
#2
Senior Member
Don't suppose you manipulated that script in a windows file editor, they've been known to put stupid EOF's where thier not needed - probably not your answer though.
-
October 6th, 2001, 05:34 PM
#3
Nope. It was entirely typed in using vi. Its an odd thing. Never seen it before and the script is as its supposed to be. So I'm at a total loss as to why its responding the way it is.
-
October 6th, 2001, 08:27 PM
#4
Member
Hmmm. In C++, that message usually means you forgot a closing brace. For example
{
DoSomething()
{
DoAnotherThing()
}
Hope that helps
Q: Why do ducks have big flat feet?
A: To stamp out forest fires
Q: Why do elephants have big flat feet?
A: To stamp out flaming ducks
-
October 6th, 2001, 08:38 PM
#5
Nope. Not a C/C++ proggie.. its shell script. =(. This has me stumped. Makes no sense at all.
-
October 7th, 2001, 12:34 AM
#6
mittens: what functions are taking place in line 108 or calling a function there ?
Antionline in a nutshell
\"You\'re putting the fate of the world in the hands of a bunch of idiots I wouldn\'t trust with a potato gun\"
Trust your Technolust
-
October 7th, 2001, 01:06 AM
#7
This is the script:
#!/bin/sh
# For Red Hat chkconfig
# chkconfig: - 30 80
# description: the qmail MTA
PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export PATH
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
case "$1" in
start)
echo "Starting qmail"
if svok /service/qmail-send ; then
svc -u /service/qmail-send
else
echo qmail-send service not running
fi
if svok /service/qmail-smtpd ; then
svc -u /service/qmail-smtpd
else
echo qmail-smtpd service not running
fi
if [ -d /var/lock/subsys ]; then
touch /var/lock/subsys/qmail
fi
;;
stop)
echo "Stopping qmail..."
echo " qmail-smtpd"
svc -d /service/qmail-smtpd
echo " qmail-send"
svc -d /service/qmail-send
if [ -f /var/lock/subsys/qmail ]; then
rm /var/lock/subsys/qmail
fi
;;
stat)
svstat /service/qmail-send
svstat /service/qmail-send/log
svstat /service/qmail-smtpd
svstat /service/qmail-smtpd/log
qmail-qstat
;;
doqueue|alrm|flush)
echo "Sending ALRM signal to qmail-send."
svc -a /service/qmail-send
;;
queue)
qmail-qstat
qmail-qread
;;
reload|hup)
echo "Sending HUP signal to qmail-send."
svc -h /service/qmail-send
;;
pause)
echo "Pausing qmail-send"
svc -p /service/qmail-send
echo "Pausing qmail-smtpd"
svc -p /service/qmail-smtpd
;;
cont)
echo "Continuing qmail-send"
svc -c /service/qmail-send
echo "Continuing qmail-smtpd"
svc -c /service/qmail-smtpd
;;
restart)
echo "Restarting qmail:"
echo "* Stopping qmail-smtpd."
svc -d /service/qmail-smtpd
echo "* Sending qmail-send SIGTERM and restarting."
svc -t /service/qmail-send
echo "* Restarting qmail-smtpd."
svc -u /service/qmail-smtpd
;;
cdb)
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
chmod 644 /etc/tcp.smtp.cdb
echo "Reloaded /etc/tcp.smtp."
;;
help)
cat <<HELP
stop -- stops mail service (smtp connections refused, nothing goes out)
start -- starts mail service (smtp connection accepted, mail can go out)
pause -- temporarily stops mail service (connections accepted, nothing leaves)
cont -- continues paused mail service
stat -- displays status of mail service
cdb -- rebuild the tcpserver cdb file for smtp
restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it
doqueue -- sends qmail-send ALRM, scheduling queued messages for delivery
reload -- sends qmail-send HUP, rereading locals and virtualdomains
queue -- shows status of queue
alrm -- same as doqueue
flush -- same as doqueue
hup -- same as reload
HELP
;;
*)
echo "Usage: $0 {start|stop|restart|doqueue|flush|reload|stat|pause|cont|cdb|queue|help}"
exit 1
;;
esac
exit 0
-
October 7th, 2001, 06:31 AM
#8
echo "Usage: $0 {start|stop|restart|doqueue|flush|reload|stat|paus
e|cont|cdb|queue|help}"
exit 1
;;
esac <<----------------- it doesn't know what to do with this.
exit 0
Antionline in a nutshell
\"You\'re putting the fate of the world in the hands of a bunch of idiots I wouldn\'t trust with a potato gun\"
Trust your Technolust
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|