Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > media > main-testing-src > by-pkgid > d21c8488dd562ca286c921d792007cfa > files > 23

udev-128-2.3mnb2.src.rpm

#!/bin/sh

[ -z "$INTERFACE" ] && exit 0

[ -r /etc/sysconfig/udev_net ] && . /etc/sysconfig/udev_net
[ -n "$BLACKLIST_ALL" ] && eval "case $INTERFACE in $BLACKLIST_ALL) exit 1;; esac"
[ -n "$BLACKLIST_PERSISTENT" ] && eval "case $INTERFACE in $BLACKLIST_PERSISTENT) exit 1;; esac"

# eagle-usb/firewire create a fake ethX interface
[ "$PHYSDEVDRIVER" = "ne2k-pci" ] || /usr/sbin/ethtool $INTERFACE &>/dev/null || exit 0

# conform to network service (AUTOMATIC_IFCFG)
[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network

CFG=/etc/sysconfig/network-scripts/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
EOF
fi