|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/etc/sysconfig/network-scripts/ |
Upload File : |
#!/bin/sh
# This should be called whenever an interface goes down, not just when
# it is brought down explicitly.
cd /etc/sysconfig/network-scripts
. network-functions
CONFIG=$1
source_config
if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then
if [ -f /etc/resolv.conf.save ]; then
change_resolv_conf /etc/resolv.conf.save
rm -f /etc/resolv.conf.save
fi
if [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" ]; then
if [ -f /etc/ppp/peers/$DEVICE ] ; then
rm -f /etc/ppp/peers/$DEVICE
fi
fi
fi
# Reset the default route if this interface had a special one
if ! check_default_route ; then
# ISDN device needs special handling dial on demand
if [ "${DEVICETYPE}" = "ippp" -o "${DEVICETYPE}" = "isdn" ] && [ "$DIALMODE" = "auto" ] ; then
if [ -z "$GATEWAY" ] ; then
/sbin/ip route add default ${WINDOW:+window $WINDOW} dev ${DEVICE}
else
/sbin/ip route add default ${WINDOW:+window $WINDOW} via ${GATEWAY}
fi
else
add_default_route ${DEVICE}
fi
fi
# Notify programs that have requested notification
do_netreport
if [ -x /sbin/ifdown-local ]; then
/sbin/ifdown-local ${DEVICE}
fi
exit 0