# ACTION=%s [register or unregister]
# INTERFACE=%s
-. /etc/sysconfig/network-scripts/network-functions
+. /etc/sysconfig/network-scripts/functions.network
mesg() {
/usr/bin/logger -t $(basename $0)"[$$]" "$@"
# NOTE: network configuration relies on administered state,
# we can't do much here without distro-specific knowledge
# such as whether/how to invoke DHCP, set up bridging, etc.
-
- # Run ifrename as needed - Jean II
- # Remap interface names based on MAC address. This workaround
- # the dreaded configuration problem "all my cards are 'eth0'"...
- # This needs to be done before ifup otherwise ifup will get
- # confused by the name changed and because iface need to be
- # down to change its name.
- if [ -x /sbin/ifrename ] && [ -r /etc/iftab ]; then
- debug_mesg invoke ifrename for $INTERFACE
- NEWNAME=`/sbin/ifrename -i $INTERFACE`
- if [ -n "$NEWNAME" ]; then
- debug_mesg iface $INTERFACE is remapped to $NEWNAME
- INTERFACE=$NEWNAME
- fi;
- fi
-
# conform to network service (AUTOMATIC_IFCFG)
+
[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
# don't do anything for non ethernet devices
ethernet_check $INTERFACE || exit 0;
# automatically create an interface file
- CFG=/etc/sysconfig/network-scripts/ifcfg-$INTERFACE
+ CFG=/etc/sysconfig/interfaces/ifcfg-$INTERFACE
if [ "$AUTOMATIC_IFCFG" != no -a ! -r $CFG ]; then
debug_mesg creating config file for $INTERFACE
cat > $CFG <<EOF
DEVICE=$INTERFACE
BOOTPROTO=dhcp
-ONBOOT=yes
+ONBOOT=no
EOF
fi
if [ -x /sbin/ifup ]; then
debug_mesg invoke ifup $INTERFACE
- exec /sbin/ifup $INTERFACE daemon
+ exec /sbin/ifup $INTERFACE hotplug
fi
;;
esac
*)
if [ -x /sbin/ifdown ]; then
debug_mesg invoke ifdown $INTERFACE
- exec /sbin/ifdown $INTERFACE daemon
+ exec /sbin/ifdown $INTERFACE hotplug
fi
;;
esac