Redhat/Fedora requires var/lock/subsys/ipsec for runlevel changes
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 1 Aug 2008 12:04:35 +0000 (12:04 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 1 Aug 2008 12:04:35 +0000 (12:04 -0000)
src/ipsec/ipsec.in

index 8e5bdc4..05db364 100755 (executable)
@@ -243,6 +243,9 @@ secrets)
        ;;
 start)
        shift
+       if [ -d /var/lock/subsys ]; then
+               touch /var/lock/subsys/ipsec
+       fi
        exec $IPSEC_STARTER "$@"
        ;;
 status|statusall)
@@ -306,6 +309,9 @@ stop)
        else
                echo "Stopping strongSwan IPsec failed: starter is not running" >&2
        fi
+       if [ -d /var/lock/subsys ]; then
+               rm -f /var/lock/subsys/ipsec
+       fi
        exit 0
        ;;
 up)