]> git.pld-linux.org Git - packages/systemd.git/blobdiff - udev-net.helper
- Obsoletes elogind
[packages/systemd.git] / udev-net.helper
index 06df968a6c9a0e1052768b50556acae5a7057ad0..b9199fb42e63fa3ed2e492b2df7dc3361e52e71d 100644 (file)
@@ -5,7 +5,7 @@
 #      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)"[$$]" "$@"
@@ -46,36 +46,21 @@ add|register)
            # 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
 
@@ -86,7 +71,7 @@ EOF
 
            if [ -x /sbin/ifup ]; then
                debug_mesg invoke ifup $INTERFACE
-               exec /sbin/ifup $INTERFACE daemon
+               exec /sbin/ifup $INTERFACE hotplug
            fi
            ;;
     esac
@@ -103,7 +88,7 @@ remove|unregister)
        *)
            if [ -x /sbin/ifdown ]; then
                debug_mesg invoke ifdown $INTERFACE
-               exec /sbin/ifdown $INTERFACE daemon
+               exec /sbin/ifdown $INTERFACE hotplug
            fi
            ;;
     esac
This page took 0.064772 seconds and 4 git commands to generate.