]> git.pld-linux.org Git - packages/crossfire.git/blobdiff - crossfire.init
- release 7
[packages/crossfire.git] / crossfire.init
index 450b020f158ada02ee8503b892620af93198e9ff..1a2958f4f6d2cef816d8fbb5186e1878cd7145c6 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # chkconfig:   345 98 03
-# description: Starts and stops the Crossfire server 
+# description: Starts and stops the Crossfire server
 #
 
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
@@ -17,7 +17,7 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
 
 # Check that networking is up.
 if is_yes "${NETWORKING}"; then
-       if [ ! -f /var/lock/subsys/network ]; then
+       if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
                msg_network_down crossfire
                exit 1
        fi
@@ -33,7 +33,7 @@ case "$1" in
        if [ ! -f /var/lock/subsys/crossfire ]; then
                cd /
                FLAGS="-log /var/log/crossfire"
-               if [ -n "$PORT" ] ; then
+               if [ -n "$PORT" ]; then
                        FLAGS="$FLAGS -csport $PORT"
                fi
                if is_yes "$DEBUG" ; then
@@ -42,7 +42,7 @@ case "$1" in
                        FLAGS="$FLAGS +d"
                fi
                msg_starting crossfire
-               daemon su games -c "\"exec crossfire -detach $FLAGS >>/var/log/crossfire 2>&1\"" 
+               daemon su games -s /bin/sh -c "\"exec crossfire -detach $FLAGS >>/var/log/crossfire 2>&1\""
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/crossfire
        else
@@ -80,7 +80,7 @@ case "$1" in
        ;;
   *)
        msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
-       exit 7
+       exit 3
 esac
 
 exit $RETVAL
This page took 0.05873 seconds and 4 git commands to generate.