--- SuSEfirewall2-3.6_SVNr183/SuSEfirewall2.orig 2008-01-27 02:30:46 +0700 +++ SuSEfirewall2-3.6_SVNr183/SuSEfirewall2 2008-01-27 02:55:01 +0700 @@ -112,7 +112,7 @@ syslog() pri="-p auth.warn" fi shift - /bin/logger $dashs $pri -t SuSEfirewall2 "$*" + /usr/bin/logger $dashs $pri -t SuSEfirewall2 "$*" } message() @@ -156,7 +156,7 @@ need() CONFIGURATIONSDIR_0="/etc/sysconfig/SuSEfirewall2.d/services" CONFIGURATIONSDIR_1="/usr/share/SuSEfirewall2/services" -SCRIPTSDIR="/etc/sysconfig/scripts" +SCRIPTSDIR="/etc/sysconfig/SuSEfirewall2.d/scripts" FWCONFIG="/etc/sysconfig/SuSEfirewall2" LOCKFILE="/var/lock/SuSEfirewall2.pid" BOOTLOCKFILE="/var/lock/SuSEfirewall2.booting" @@ -184,7 +184,7 @@ if test -x /usr/bin/tty && ! /usr/bin/tt quiet=1 fi -getopttmp=`/usr/bin/getopt -o hq --long help,scriptsdir:,batch,nobatch,file:,debug,test,bootlock,bootunlock,quiet \ +getopttmp=`/bin/getopt -o hq --long help,scriptsdir:,batch,nobatch,file:,debug,test,bootlock,bootunlock,quiet \ -n 'SuSEfirewall2' -- "$@"` [ $? != 0 ] && die 1 "getopt error" @@ -239,7 +239,7 @@ case "$ACTION" in ;; esac -test -e /etc/sysconfig/network/config && . /etc/sysconfig/network/config +test -e /etc/sysconfig/network && . /etc/sysconfig/network if [ -r "$FWCONFIG" ]; then . "$FWCONFIG" @@ -268,11 +268,11 @@ export LANG=en_US export PATH="/sbin:/bin:/usr/sbin:/usr/bin" -hwdesc2iface=/etc/sysconfig/network/scripts/hwdesc2iface +hwdesc2iface="$SCRIPTSDIR/hwdesc2iface" modinfo="/sbin/modinfo" -TC="/usr/sbin/tc" -IPTABLES_BIN="/usr/sbin/iptables" -IP6TABLES_BIN="/usr/sbin/ip6tables" +TC="/sbin/tc" +IPTABLES_BIN="/sbin/iptables" +IP6TABLES_BIN="/sbin/ip6tables" if [ "$MODE" = debug ]; then IPTABLES="iptables" iptables() @@ -518,7 +518,10 @@ clear_qdisc_settings() { local dev local bandwidth for data in $FW_HTB_TUNE_DEV; do - IFS="," read dev bandwidth < <(echo "$data") + OLDIFS="$IFS" + export IFS="," + echo "$data" | read dev bandwidth + IFS="$OLDIFS" $TC qdisc del dev $dev root 2> /dev/null done } @@ -682,19 +685,20 @@ function set_basic_rules() handle_initscripts() { - local i - case "$INITSCRIPTS" in - on) - for i in SuSEfirewall2_init SuSEfirewall2_setup; do - /sbin/insserv -f $i - done - ;; - off) - for i in SuSEfirewall2_setup SuSEfirewall2_init; do - /sbin/insserv -r -f $i - done - ;; - esac +# local i +# case "$INITSCRIPTS" in +# on) +# for i in SuSEfirewall2_init SuSEfirewall2_setup; do +# /sbin/insserv -f $i +# done +# ;; +# off) +# for i in SuSEfirewall2_setup SuSEfirewall2_init; do +# /sbin/insserv -r -f $i +# done +# ;; +# esac + true } # set $dev to actual name of device $1 @@ -826,7 +830,7 @@ check_interfaces_unique() source_config_for_iface() { local iface="$1" - local dir=/etc/sysconfig/network + local dir="$SCRIPTSDIR" if [ -x /sbin/getcfg ] ; then eval `/sbin/getcfg -d $dir -f ifcfg- -- $iface 2>/dev/null` cfg="$HWD_CONFIG_0"