diff --git a/etc/init/iptables.conf b/etc/init/iptables.conf new file mode 100644 index 0000000..66d3583 --- /dev/null +++ b/etc/init/iptables.conf @@ -0,0 +1,20 @@ +description "Setup and Start iptables firewall" +author "Harald Kueller " +version 1.0 +emits none special + +start on ( runlevel [2345] and (stopped routing)) + +console output + +pre-start script + if [ [ ! -f /var/state/iptables.state ] && [ -f /etc/sysconfig/net/firewall ] ]; then + /etc/init.d/firewall configure + fi +end script + +script + if [ -f /var/state/iptables.state ]; then + /etc/init.d/firewall start + fi +end script diff --git a/init/genpkg b/init/genpkg index 8601b79..bb2b67d 100644 --- a/init/genpkg +++ b/init/genpkg @@ -21,18 +21,20 @@ # # -WDIR=`pwd` -cd etc/init.d -chmod 755 firewall -mkdir rc{0,1,2,3,4,5,6}.d -for i in 0 6; do - cd rc$i.d - ln -s ../firewall K75firewall - cd .. -done -for i in 1 2 3 4 5; do - cd rc$i.d - ln -s ../firewall S12firewall - cd .. -done -cd $WDIR +if [ -d /var/install/sysvinit* ]; then + WDIR=`pwd` + cd etc/init.d + chmod 755 firewall + mkdir rc{0,1,2,3,4,5,6}.d + for i in 0 6; do + cd rc$i.d + ln -s ../firewall K75firewall + cd .. + done + for i in 1 2 3 4 5; do + cd rc$i.d + ln -s ../firewall S12firewall + cd .. + done + cd $WDIR +fi