log_script_name "$0 $*"
-BACKGROUND_START=yes
-
# Load global network parameters
source /etc/sysconfig/network/network-parameters
network_start()
{
NUMBER_OF_IF_STARTED=0
- NUMBER_OF_IF_TO_START=$(echo ${INTERFACES_UP} | wc -w)
+ NUMBER_OF_IF_TO_START=$(echo ${INTERFACES} | wc -w)
- for i in ${INTERFACES_UP}; do
+ for i in ${INTERFACES}; do
if LANG=C egrep -q -L "^ONBOOT=\"?[Yy][Ee][Ss]\"?" ifconfig.$i ; then
local STR="Ethernet Adapter <$i> init"
local CMD="/etc/rc.d/init.d/ifup $i"
fi
}
-if [ x"${DNS_SERVER_ENA}" == xyes ]; then
- cat > /etc/dhclient-enter-hooks << "EOF"
-# If named is running, do not let dhclient create or modify resolv.conf
-# by specifying an empty function hook:
-make_resolv_conf(){
- :
+network_stop()
+{
+ for i in ${INTERFACES} ; do
+ if LC_ALL= LANG= ip link show dev $i 2> /dev/null | grep -q "UP";
+ then
+ cmd_run_log_box_warn "Ethernet Adapter <$i> stop" \
+ /etc/rc.d/init.d/ifdown "$i"
+ fi
+ done
+
+ ip route flush all
}
-EOF
- chmod u+x /etc/dhclient-enter-hooks
-else
- if [ -f /etc/dhclient-enter-hooks ]; then
- rm /etc/dhclient-enter-hooks
- fi
-fi
# See how we were called.
case "$1" in
stop)
clean_network_up_indication
-
- for i in ${INTERFACES_DN} ; do
- if LC_ALL= LANG= ip link show dev $i 2> /dev/null | grep -q "UP";
- then
- cmd_run_log_box_warn "Ethernet Adapter <$i> stop" \
- /etc/rc.d/init.d/ifdown "$i"
- fi
- done
+ network_stop
;;
restart)