chiark / gitweb /
[PATCH] small udev patch
[elogind.git] / etc / dev.d / net / hotplug.dev
1 #!/bin/sh
2 #
3 # Script to ensure that any network device that udev renames
4 # still gets the hotplug script run with the proper name.
5 #
6 # Released under the GPL v2
7 #
8 # Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
9 #
10
11 # See if we really did rename this device.
12 if [ "$INTERFACE" = "$DEVNAME" ]; then
13         exit 0
14 fi
15
16 # ok, we have renamed this device, so let's set $INTERFACE to the new name
17 # and call the network hotplug script to handle it properly...
18 INTERFACE=$DEVNAME
19 export INTERFACE
20 if [ -f /etc/hotplug.d/default/default.hotplug ]; then
21         exec /etc/hotplug.d/default/default.hotplug net
22 fi
23