diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-12-20 08:57:31 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:19:09 -0700 |
commit | eabfc9736703ce0dc81b233d78821d408aa565f2 (patch) | |
tree | a34d77ab4794731cbed5212dd78c8870f33ce7e2 /etc | |
parent | 9f8dfa19cfd2b502bf794f39a421cbb7c4cc0404 (diff) |
[PATCH] handle renamed network interfaces properly if we manage hotplug.d/
If we take over the hotplug call and manage the events we don't need
to call the event fake script in dev.d/. Just set all expected values
to the new network interface name and call hotplug.d/. This way the
device renaming is completely handled inside of udev and userspace
can't get confused.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/dev.d/net/hotplug.dev | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/etc/dev.d/net/hotplug.dev b/etc/dev.d/net/hotplug.dev index 15cc5cb52e..e195b0f034 100644 --- a/etc/dev.d/net/hotplug.dev +++ b/etc/dev.d/net/hotplug.dev @@ -8,15 +8,13 @@ # Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com> # -# See if we really did rename this device. -if [ "$INTERFACE" = "$DEVNAME" ]; then +# Do nothing if udev handles hotplug.d. +if [ "$MANAGED_EVENT" == "1" ]; then exit 0 fi -# ok, we have renamed this device, so let's set $INTERFACE to the new name -# and call the network hotplug script to handle it properly... -INTERFACE=$DEVNAME -export INTERFACE +# ok, we have renamed this device, so let the network hotplug script +# know about it to setup the device properly... if [ -f /etc/hotplug.d/default/default.hotplug ]; then exec /etc/hotplug.d/default/default.hotplug net fi |