Blame | Last modification | View Log | RSS feed
#!/bin/sh# Don't do anything if the network is stoppedif [ ! -f /var/lock/subsys/network ]; thenexit 0fiif [ -f /dev/.in_sysinit ] ; thenexit 0fi. /etc/sysconfig/network-scripts/network-functionsif [ "$INTERFACE" = "" ]; thenexit 1ficase $ACTION inadd|register)case $INTERFACE in# interfaces that are brought up as a part of configurationppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*)exit 0;;# interfaces that are registered then brought up*)if [ -e /proc/net/vlan/${INTERFACE} ]; thenexit 0fiexport IN_HOTPLUG=1if [ -x /sbin/ifup ]; thenaddr=$(get_hwaddr ${INTERFACE})if [ -n "$addr" ]; thennconfig=$(get_config_by_hwaddr ${addr})[ -n "$nconfig" ] && INTERFACE=$nconfigfiexec /sbin/ifup $INTERFACEfi;;esac;;remove|unregister)case $INTERFACE in# interfaces that are brought down as part of deconfigurationppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*)exit 0;;*)export IN_HOTPLUG=1if [ -x /sbin/ifdown ]; thenexec /sbin/ifdown $INTERFACEfi;;esac;;*)exit 1 ;;esac