diff options
Diffstat (limited to 'rc.d/init.d/network')
-rwxr-xr-x | rc.d/init.d/network | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network index cb3a9768..7ef76e96 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -107,8 +107,12 @@ case "$1" in ;; esac ./ifdown ifcfg-lo - action "Disabling IPv4 packet forwarding" /bin/true - echo 0 > /proc/sys/net/ipv4/ip_forward + if [ -d /proc/sys/net/ipv4 -a -f /proc/sys/net/ipv4/ip_forward ]; then + if [ `cat /proc/sys/net/ipv4/ip_forward` != 0 ]; then + action "Disabling IPv4 packet forwarding" /bin/true + echo 0 > /proc/sys/net/ipv4/ip_forward + fi + fi rm -f /var/lock/subsys/network ;; status) |