packages
packages copied to clipboard
New static-device-names package
Maintainer: me / @jstrot Compile tested: x86/64, generic, OpenWrt SNAPSHOT r25250-873b0ed42c Run tested: x86/64, generic, OpenWrt SNAPSHOT r25250-873b0ed42c
Description
The purpose of this package is to make sure that network device names are always assigned to the correct devices on systems, like x86, where moving a NIC to a different motherboard slot may device names to be assigned in a different order during boot.
The static-device-names service matches network devices by a number of criteria, like their MAC address or PCI ID.
I'd love to try this out; is there an easy and reversible way to do that?
@wez You can simply manually download and place the files in the right location like I did: static-device-names.config to /etc/config/static-device-names static-device-names.init to /etc/init.d/static-device-names (probably needs chmod +x) static-device-names.hotplug to /etc/hotplug.d/net/static-device-names (though this one is not completely finished, needs a little modification if you need hotplug support. This is the file I use: static-device-names.hotplug.txt)
@jstrot It seems to work great for me, I hope it is available as a package soon! :)
I'd love to try this out; is there an easy and reversible way to do that?
Hi @wez,
It's reversible if you disable the service or remove the files and reboot: All your interfaces will be back to their default names.
If you mess up the interface names, just fix the mapping in the config and restart the service and it will re-rename them according to your updated config.
Let me know how it works out for you!
@jstrot It seems to work great for me, I hope it is available as a package soon! :)
Thanks for the feedback. It's been working great for me so far as well. I'll figure out how the CI/CD pipeline works and get this committed soon.
Cheers
Hotplug support is complete and I also added pci_slot
and usb_slot
criteria.
OpenWRT maintainers, please review and merge at your convenience.
Thanks.