diff -cr apf-0.9.6-3-orig/apf.init apf-0.9.6-3-ubuntu/apf.init *** apf-0.9.6-3-orig/apf.init 2007-06-17 00:16:25.000000000 +0300 --- apf-0.9.6-3-ubuntu/apf.init 2008-02-28 09:17:10.000000000 +0200 *************** *** 5,11 **** # # source function library ! . /etc/rc.d/init.d/functions # import variables . /etc/apf/conf.apf . /etc/apf/internals/internals.conf --- 5,11 ---- # # source function library ! . /lib/lsb/init-functions # import variables . /etc/apf/conf.apf . /etc/apf/internals/internals.conf *************** *** 17,30 **** case "$1" in start) echo -n "Starting APF:" ! /usr/local/sbin/apf --start >> /dev/null 2>&1 ! echo_success echo ;; stop) echo -n "Stopping APF:" /usr/local/sbin/apf --stop >> /dev/null 2>&1 ! echo_success echo ;; restart) --- 17,31 ---- case "$1" in start) echo -n "Starting APF:" ! start-stop-daemon --start --exec /usr/local/sbin/apf -- "--start" >> /dev/null 2>&1 ! log_end_msg 0 echo ;; stop) echo -n "Stopping APF:" /usr/local/sbin/apf --stop >> /dev/null 2>&1 ! start-stop-daemon --stop --exec /usr/local/sbin/apf -- "--stop" >> /dev/null 2>&1 ! log_end_msg 0 echo ;; restart) diff -cr apf-0.9.6-3-orig/.ca.def apf-0.9.6-3-ubuntu/.ca.def *** apf-0.9.6-3-orig/.ca.def 2008-01-31 19:40:26.000000000 +0200 --- apf-0.9.6-3-ubuntu/.ca.def 2008-02-28 08:14:47.000000000 +0200 *************** *** 1,5 **** cat > .conf.apf < --- 1,5 ---- cat > .conf.apf < diff -cr apf-0.9.6-3-orig/cron.daily apf-0.9.6-3-ubuntu/cron.daily *** apf-0.9.6-3-orig/cron.daily 2004-02-20 10:37:55.000000000 +0200 --- apf-0.9.6-3-ubuntu/cron.daily 2008-02-28 08:53:19.000000000 +0200 *************** *** 1,2 **** ! #!/bin/sh ! /etc/rc.d/init.d/apf restart >> /dev/null 2>&1 --- 1,2 ---- ! #!/bin/bash ! /etc/init.d/apf restart >> /dev/null 2>&1 diff -cr apf-0.9.6-3-orig/files/apf apf-0.9.6-3-ubuntu/files/apf *** apf-0.9.6-3-orig/files/apf 2008-01-31 19:01:33.000000000 +0200 --- apf-0.9.6-3-ubuntu/files/apf 2008-02-28 08:05:11.000000000 +0200 *************** *** 1,4 **** ! #!/bin/sh # # APF 0.9.6 [apf@r-fx.org] ### --- 1,4 ---- ! #!/bin/bash # # APF 0.9.6 [apf@r-fx.org] ### *************** *** 77,83 **** if [ "$EMPTY_MD5" == "" ]; then $MD5 $MD5_FILES > $INSTALL_PATH/internals/.md5.cores 2> /dev/null fi ! $MD5 $MD5_FILES > $INSTALL_PATH/internals/.md5.cores.new 2> /dev/null VARS_DIFF=`$DIFF $INSTALL_PATH/internals/.md5.cores.new $INSTALL_PATH/internals/.md5.cores` if [ ! "$VARS_DIFF" == "" ]; then $MD5 $MD5_FILES > $INSTALL_PATH/internals/.md5.cores 2> /dev/null --- 77,83 ---- if [ "$EMPTY_MD5" == "" ]; then $MD5 $MD5_FILES > $INSTALL_PATH/internals/.md5.cores 2> /dev/null fi ! $MD5 $MD5_FILES > $INSTALL_PATH/internals/.md5.cores.new 2> /dev/null VARS_DIFF=`$DIFF $INSTALL_PATH/internals/.md5.cores.new $INSTALL_PATH/internals/.md5.cores` if [ ! "$VARS_DIFF" == "" ]; then $MD5 $MD5_FILES > $INSTALL_PATH/internals/.md5.cores 2> /dev/null *************** *** 119,125 **** eout "{glob} !!DEVELOPMENT MODE ENABLED!! - firewall will flush every 5 minutes." fi exit 0 ! elif [ "$SKIP_FASTLOAD_FIRSTRUN" == "1" ]; then eout "{glob} first run? fast load skipped [internals/.last.full not present]" elif [ "$SKIP_FASTLOAD_EXPIRED" == "1" ]; then eout "{glob} fast load snapshot more than 1h old, going full load" --- 119,125 ---- eout "{glob} !!DEVELOPMENT MODE ENABLED!! - firewall will flush every 5 minutes." fi exit 0 ! elif [ "$SKIP_FASTLOAD_FIRSTRUN" == "1" ]; then eout "{glob} first run? fast load skipped [internals/.last.full not present]" elif [ "$SKIP_FASTLOAD_EXPIRED" == "1" ]; then eout "{glob} fast load snapshot more than 1h old, going full load" diff -cr apf-0.9.6-3-orig/files/conf.apf apf-0.9.6-3-ubuntu/files/conf.apf *** apf-0.9.6-3-orig/files/conf.apf 2008-01-31 19:40:10.000000000 +0200 --- apf-0.9.6-3-ubuntu/files/conf.apf 2008-02-28 08:15:06.000000000 +0200 *************** *** 1,4 **** ! #!/bin/sh # # APF 0.9.6 [apf@r-fx.org] # Copyright (C) 1999-2007, R-fx Networks --- 1,4 ---- ! #!/bin/bash # # APF 0.9.6 [apf@r-fx.org] # Copyright (C) 1999-2007, R-fx Networks diff -cr apf-0.9.6-3-orig/files/extras/dshield/cron.ds apf-0.9.6-3-ubuntu/files/extras/dshield/cron.ds *** apf-0.9.6-3-orig/files/extras/dshield/cron.ds 2003-08-27 10:58:48.000000000 +0300 --- apf-0.9.6-3-ubuntu/files/extras/dshield/cron.ds 2008-02-28 08:15:28.000000000 +0200 *************** *** 1,2 **** ! #!/bin/sh /usr/local/sbin/dshield >> /dev/null 2>&1 --- 1,2 ---- ! #!/bin/bash /usr/local/sbin/dshield >> /dev/null 2>&1 diff -cr apf-0.9.6-3-orig/files/extras/dshield/install apf-0.9.6-3-ubuntu/files/extras/dshield/install *** apf-0.9.6-3-orig/files/extras/dshield/install 2003-08-27 11:05:34.000000000 +0300 --- apf-0.9.6-3-ubuntu/files/extras/dshield/install 2008-02-28 08:15:34.000000000 +0200 *************** *** 1,4 **** ! #!/bin/sh if [ -d "/usr/local/dshield" ]; then echo "dshield client already installed, aborting." --- 1,4 ---- ! #!/bin/bash if [ -d "/usr/local/dshield" ]; then echo "dshield client already installed, aborting." diff -cr apf-0.9.6-3-orig/files/extras/get_ports apf-0.9.6-3-ubuntu/files/extras/get_ports *** apf-0.9.6-3-orig/files/extras/get_ports 2007-01-14 12:29:10.000000000 +0200 --- apf-0.9.6-3-ubuntu/files/extras/get_ports 2008-02-28 08:15:20.000000000 +0200 *************** *** 1,4 **** ! #!/bin/sh # # APF 0.9.6 [apf@r-fx.org] ### --- 1,4 ---- ! #!/bin/bash # # APF 0.9.6 [apf@r-fx.org] ### diff -cr apf-0.9.6-3-orig/files/extras/importconf apf-0.9.6-3-ubuntu/files/extras/importconf *** apf-0.9.6-3-orig/files/extras/importconf 2007-06-11 12:38:53.000000000 +0300 --- apf-0.9.6-3-ubuntu/files/extras/importconf 2008-02-28 08:15:24.000000000 +0200 *************** *** 1,4 **** ! #!/bin/sh # # APF 0.9.6 [apf@r-fx.org] ### --- 1,4 ---- ! #!/bin/bash # # APF 0.9.6 [apf@r-fx.org] ### diff -cr apf-0.9.6-3-orig/files/firewall apf-0.9.6-3-ubuntu/files/firewall *** apf-0.9.6-3-orig/files/firewall 2008-01-31 19:46:06.000000000 +0200 --- apf-0.9.6-3-ubuntu/files/firewall 2008-02-28 08:15:10.000000000 +0200 *************** *** 1,4 **** ! #!/bin/sh # # APF 0.9.6 [apf@r-fx.org] ### --- 1,4 ---- ! #!/bin/bash # # APF 0.9.6 [apf@r-fx.org] ### diff -cr apf-0.9.6-3-orig/files/internals/functions.apf apf-0.9.6-3-ubuntu/files/internals/functions.apf *** apf-0.9.6-3-orig/files/internals/functions.apf 2008-02-12 19:47:38.000000000 +0200 --- apf-0.9.6-3-ubuntu/files/internals/functions.apf 2008-02-28 09:09:19.000000000 +0200 *************** *** 1,4 **** ! #!/bin/sh # # APF 0.9.6 [apf@r-fx.org] ### --- 1,4 ---- ! #!/bin/bash # # APF 0.9.6 [apf@r-fx.org] ### *************** *** 391,398 **** /usr/bin/pico -w $iptc elif [ -f "/usr/bin/nano" ]; then /usr/bin/nano -w $iptc ! elif [ -f "/bin/vi" ]; then ! /bin/vi $iptc fi clear rm -f $iptc --- 391,398 ---- /usr/bin/pico -w $iptc elif [ -f "/usr/bin/nano" ]; then /usr/bin/nano -w $iptc ! elif [ -f "/usr/bin/vi" ]; then ! /usr/bin/vi $iptc fi clear rm -f $iptc *************** *** 1445,1451 **** if [ ! "$SET_REFRESH" == "0" ] && [ ! "$SET_REFRESH" == "" ]; then cat< $INSTALL_PATH/internals/cron.refresh MAILTO= ! SHELL=/bin/sh */$SET_REFRESH * * * * root /etc/apf/apf --refresh >> /dev/null 2>&1 & EOF chmod 644 $INSTALL_PATH/internals/cron.refresh --- 1445,1451 ---- if [ ! "$SET_REFRESH" == "0" ] && [ ! "$SET_REFRESH" == "" ]; then cat< $INSTALL_PATH/internals/cron.refresh MAILTO= ! SHELL=/bin/bash */$SET_REFRESH * * * * root /etc/apf/apf --refresh >> /dev/null 2>&1 & EOF chmod 644 $INSTALL_PATH/internals/cron.refresh diff -cr apf-0.9.6-3-orig/files/vnet/vnetgen apf-0.9.6-3-ubuntu/files/vnet/vnetgen *** apf-0.9.6-3-orig/files/vnet/vnetgen 2007-05-26 00:12:51.000000000 +0300 --- apf-0.9.6-3-ubuntu/files/vnet/vnetgen 2008-02-28 08:16:33.000000000 +0200 *************** *** 1,3 **** --- 1,4 ---- + #!/bin/bash # # APF 0.9.6 [apf@r-fx.org] ### *************** *** 78,84 **** elif [ -f "$ifconfig" ]; then for iface in `ifconfig | grep -w $anet | awk '{print$1}'`; do valtif=`echo $TIF | grep $anet` ! if [ "$valtif" == "" ]; then for addr in `ifconfig $iface | grep -w inet | tr ':' ' ' | grep -vw $NET | awk '{print$3}'`; do if [ ! -f "$INSTALL_PATH/vnet/$addr.rules" ]; then touch $INSTALL_PATH/vnet/$addr.rules --- 79,85 ---- elif [ -f "$ifconfig" ]; then for iface in `ifconfig | grep -w $anet | awk '{print$1}'`; do valtif=`echo $TIF | grep $anet` ! if [ "$valtif" == "" ]; then for addr in `ifconfig $iface | grep -w inet | tr ':' ' ' | grep -vw $NET | awk '{print$3}'`; do if [ ! -f "$INSTALL_PATH/vnet/$addr.rules" ]; then touch $INSTALL_PATH/vnet/$addr.rules diff -cr apf-0.9.6-3-orig/importconf apf-0.9.6-3-ubuntu/importconf *** apf-0.9.6-3-orig/importconf 2007-01-14 12:28:32.000000000 +0200 --- apf-0.9.6-3-ubuntu/importconf 2008-02-28 08:14:55.000000000 +0200 *************** *** 1,4 **** ! #!/bin/sh # # APF 0.9.6 [apf@r-fx.org] ### --- 1,4 ---- ! #!/bin/bash # # APF 0.9.6 [apf@r-fx.org] ### diff -cr apf-0.9.6-3-orig/install.sh apf-0.9.6-3-ubuntu/install.sh *** apf-0.9.6-3-orig/install.sh 2008-01-31 22:05:00.000000000 +0200 --- apf-0.9.6-3-ubuntu/install.sh 2008-02-28 08:19:45.000000000 +0200 *************** *** 1,4 **** ! #!/bin/sh # # APF 0.9.6 [apf@r-fx.org] ### --- 1,4 ---- ! #!/bin/bash # # APF 0.9.6 [apf@r-fx.org] ### *************** *** 55,63 **** chmod 755 /etc/cron.daily/apf fi if [ -f "/etc/rc.d/init.d/apf" ]; then ! cp -f apf.init /etc/rc.d/init.d/apf else ! cp -f apf.init /etc/rc.d/init.d/apf fi if [ -f "/var/log/apf_log" ] || [ -f "/var/log/apfados_log" ]; then rm -f /var/log/apf_log /var/log/apfados_log --- 55,63 ---- chmod 755 /etc/cron.daily/apf fi if [ -f "/etc/rc.d/init.d/apf" ]; then ! cp -f apf.init /etc/init.d/apf else ! cp -f apf.init /etc/init.d/apf fi if [ -f "/var/log/apf_log" ] || [ -f "/var/log/apfados_log" ]; then rm -f /var/log/apf_log /var/log/apfados_log *************** *** 84,90 **** DVAL=`date +"%d%m%Y-%s"` cp -R $INSTALL_PATH $INSTALL_PATH.bk$DVAL rm -f /etc/apf.bk.last ! ln -fs $INSTALL_PATH.bk$DVAL /etc/apf.bk.last rm -rf $INSTALL_PATH echo -n "Installing APF $VER: " install --- 84,90 ---- DVAL=`date +"%d%m%Y-%s"` cp -R $INSTALL_PATH $INSTALL_PATH.bk$DVAL rm -f /etc/apf.bk.last ! ln -fs $INSTALL_PATH.bk$DVAL /etc/apf.bk.last rm -rf $INSTALL_PATH echo -n "Installing APF $VER: " install