forked from canonical/netplan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate udev rules files to rename devices
Due to a systemd issue[1], using link files to rename interfaces doesn't work as expected. Link files will not rename an interface if it was already renamed, and interfaces are renamed in initrd, so set-name will often not work as expected when rebooting. However, rules files will cause a renaming, even if the interface has been renamed in initrd. So, while we sort out whether the systemd-udev behaviour is broken or not, we can simply generate udev rules files with appropriate renaming info in /run/udev/rules.d/70-netplan-<interface>.rules A file will be created for non-virtual interfaces with both a set-name and a driver or a mac address in the match stanza. (Renaming from name to name doesn't work.) This is at least a temporary fix to LP: #1770082 As far as testing goes, test successful set-name: generations, and a few cases where we expect no files to be generated. [1] systemd/systemd#9006 Signed-off-by: Daniel Axtens <dja@axtens.net>
- Loading branch information
Showing
2 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters