1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-31 16:21:11 +03:00
systemd-stable/etc/dev.d/net/hotplug.dev
kay.sievers@vrfy.org eabfc97367 [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.
2005-04-26 23:19:09 -07:00

22 lines
537 B
Bash

#!/bin/sh
#
# Script to ensure that any network device that udev renames
# still gets the hotplug script run with the proper name.
#
# Released under the GPL v2
#
# Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
#
# Do nothing if udev handles hotplug.d.
if [ "$MANAGED_EVENT" == "1" ]; then
exit 0
fi
# 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