]> git.pld-linux.org Git - packages/iptables.git/commitdiff
- upstart for ip6tables
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 12 Aug 2011 20:03:25 +0000 (20:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ip6tables.init -> 1.17
    ip6tables.upstart -> 1.1

ip6tables.init
ip6tables.upstart [new file with mode: 0644]

index aac850f05749bab75638cc3d17b2691b3a7d7e5a..8d66d65bbc2232290c5fda22e847056706c52ca5 100644 (file)
 # config: /etc/sysconfig/ip6tables
 
 IPTABLES_CONFIG=/etc/sysconfig/ip6tables
-
 if [ ! -f $IPTABLES_CONFIG ]; then
-       case "$1" in
+       case "$1" in
        start|restart|force-reload)
                exit 0
-               ;;
+       ;;
        esac
 fi
 
@@ -106,6 +105,8 @@ stop() {
        rm -f /var/lock/subsys/ip6tables
 }
 
+upstart_controlled --except status panic load save clear
+
 case "$1" in
   start|load)
        start
diff --git a/ip6tables.upstart b/ip6tables.upstart
new file mode 100644 (file)
index 0000000..6b885e9
--- /dev/null
@@ -0,0 +1,19 @@
+description "Load /etc/sysconfig/iptables pre-defined rules"
+
+start on pld.network-started
+stop on pld.network-stopped
+
+env IPTABLES_CONFIG=/etc/sysconfig/ip6tables
+
+pre-start script
+       # fail early if config missing
+       test -f $IPTABLES_CONFIG || /sbin/initctl stop
+end script
+
+script
+       exec /etc/rc.d/init.d/iptables6 load
+end script
+
+pre-stop script
+       exec /etc/rc.d/init.d/iptables6 clear
+end script
This page took 0.076395 seconds and 4 git commands to generate.