network: Configure device names from /var/ipfire/ethernet/settings

Instead of creating a copy of the configuration values and
for better extensibility, we will have udev execute a script
that parses /var/ipfire/ethernet/settings and will return the
correct name of the corresponding device (green0, blue0, ...).
This commit is contained in:
Michael Tremer
2015-03-09 15:35:57 +01:00
parent 5604dc748d
commit 600b99fb31
8 changed files with 113 additions and 4 deletions

3
config/udev/60-net.rules Normal file
View File

@@ -0,0 +1,3 @@
# Call a script that checks for the right name of the new device.
# If it matches the configuration it will be renamed accordingly.
ACTION=="add", SUBSYSTEM=="net", PROGRAM="/lib/udev/network-hotplug-rename", RESULT=="?*", NAME="$result"