]> granicus.if.org Git - fcron/commitdiff
test existence of /var/lock/subsys (used under Mandrake
authorthib <thib>
Mon, 18 Sep 2000 08:25:39 +0000 (08:25 +0000)
committerthib <thib>
Mon, 18 Sep 2000 08:25:39 +0000 (08:25 +0000)
script/sysVinit-launcher

index 3a8cfe4ad0bf2dc4d8795303f0965da19edc8541..bfcee98d23642a0aa95dbd59e3464c9e9212af74 100755 (executable)
@@ -6,7 +6,7 @@
 # processname: fcron
 # pidfile: /var/run/fcron.pid
 # config: /var/spool/fcron/*
-# $Id: sysVinit-launcher,v 1.3 2000-09-03 18:55:25 thib Exp $
+# $Id: sysVinit-launcher,v 1.4 2000-09-18 08:25:39 thib Exp $
 
 FUNCTION=0
 
@@ -30,7 +30,9 @@ case "$1" in
        fi
        RETVAL=$?
        echo
-       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/fcron
+       if test -d /var/lock/subsys/; then
+           [ $RETVAL -eq 0 ] && touch /var/lock/subsys/fcron
+       fi
        ;;
   stop)
        echo -n "Shutting down fcron"
@@ -41,7 +43,9 @@ case "$1" in
        fi
        RETVAL=$?
        echo
-       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/fcron
+       if test -d /var/lock/subsys/; then
+           [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/fcron
+       fi
        ;;
   status)
        if test $FUNCTION -eq 1; then