[Mimedefang] Re: init-script[204]: syntax error: `(' unexpected
Jeremy Mates
jmates at sial.org
Tue Jul 22 12:29:00 EDT 2003
* RC <rubbishcollector at yahoo.com>
> On Thu Jul 17 16:01, RC wrote:
> > When stopping MIMEDefang 2.35 on OpenBSD 3.0 with
> the
> > example init-script, following error occurs:
> > ./init-script[204]: syntax error: `(' unexpected
>
> Workaround - use bash:
> -#!/bin/sh
> +#!/bin/bash
That would be /usr/local/bin/bash on OpenBSD, assuming the bash port has
been installed.
OpenBSD's /bin/sh appears to be objecting to the functions named start
and stop; one fix is to rename the said functions.
--- examples/init-script.in.orig Wed Jul 2 09:35:11 2003
+++ examples/init-script.in Tue Jul 22 09:24:28 2003
@@ -132,7 +132,7 @@
SOCKET=${SOCKET:=$SPOOLDIR/$prog.sock}
MX_SOCKET=${MX_SOCKET:=$SPOOLDIR/$prog-multiplexor.sock}
-start() {
+start_daemon() {
if test -r $PID ; then
if kill -0 `cat $PID` > /dev/null 2>&1 ; then
echo "mimedefang (`cat $PID`) seems to be running."
@@ -201,7 +201,7 @@
return 0
}
-stop() {
+stop_daemon() {
# Stop daemon
printf "%-60s" "Shutting down $prog: "
if test -f "$PID" ; then
@@ -240,16 +240,16 @@
# See how we were called.
case "$1" in
start)
- start
+ start_daemon
;;
stop)
- stop
+ stop_daemon
;;
restart)
- stop
- start
+ stop_daemon
+ start_daemon
RETVAL=$?
;;
More information about the MIMEDefang
mailing list