diff options
Diffstat (limited to 'rc.d/init.d/network')
-rwxr-xr-x | rc.d/init.d/network | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network index 60913df7..b1983871 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -51,6 +51,12 @@ interfaces=`ls ifcfg* | LANG=C egrep -v '(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)' | # See how we were called. case "$1" in start) + # IPv6 hook (pre IPv4 start) + if [ "$NETWORKING_IPV6" = "yes" ]; then + if [ -x /etc/sysconfig/network-scripts/init.ipv6-global ]; then + /etc/sysconfig/network-scripts/init.ipv6-global start pre + fi + fi action $"Setting network parameters: " sysctl -e -p /etc/sysctl.conf @@ -135,6 +141,13 @@ case "$1" in done fi + # IPv6 hook (post IPv4 start) + if [ "$NETWORKING_IPV6" = "yes" ]; then + if [ -x /etc/sysconfig/network-scripts/init.ipv6-global ]; then + /etc/sysconfig/network-scripts/init.ipv6-global start post + fi + fi + touch /var/lock/subsys/network ;; stop) @@ -150,6 +163,13 @@ case "$1" in fi fi + # IPv6 hook (pre IPv4 stop) + if [ "$NETWORKING_IPV6" = "yes" ]; then + if [ -x /etc/sysconfig/network-scripts/init.ipv6-global ]; then + /etc/sysconfig/network-scripts/init.ipv6-global stop pre + fi + fi + for i in $interfaces ; do if LC_ALL= LANG= ifconfig $i 2>/dev/null | grep -q " UP " >/dev/null 2>&1 ; then action $"Shutting down interface $i: " ./ifdown $i boot @@ -175,6 +195,13 @@ case "$1" in fi fi fi + + # IPv6 hook (post IPv4 stop) + if [ "$NETWORKING_IPV6" = "yes" ]; then + if [ -x /etc/sysconfig/network-scripts/init.ipv6-global ]; then + /etc/sysconfig/network-scripts/init.ipv6-global stop post + fi + fi rm -f /var/lock/subsys/network ;; |