udev: introduce udev net_id "naming schemes"
With this we can stabilize how naming works for network interfaces. A user can request through a kernel cmdline option or an env var which scheme to follow. The idea is that installers use this to set into stone (a very soft stone though) the scheme used during installation so that interface naming doesn't change afterwards anymore. Why use env vars and kernel cmdline options, and not a config file of its own? Well, first of all there's no obvious existing one to use. But more importantly: I have the feeling that this logic is kind of an incomplete hack, and I simply don't want to do advertise this as a perfectly working solution. So far we used env vars for the non-so-official options and proper config files for the official stuff. Given how incomplete this logic is (i.e. the big variable for naming remains the kernel, which might expose sysfs attributes in newer versions that we check for and didn't exist in older versions — and other problems like this), I am simply not confident in giving this first-class exposure in a primary configuration file. Fixes: #10448
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
912b4547b5
commit
f7e81fd96f
@@ -91,6 +91,15 @@ systemd-logind:
|
||||
hibernation is available even if the swap devices do not provide enough room
|
||||
for it.
|
||||
|
||||
* `$NET_NAMING_SCHEME=` – if set, takes a network naming scheme (i.e. one of
|
||||
v238, v239, v240 …) as parameter. If specified udev's net_id builtin will
|
||||
follow the specified naming scheme when determining stable network interface
|
||||
names. This may be used to revert to naming schemes of older udev versions,
|
||||
in order to provide more stable naming across updates. This environment
|
||||
variable takes precedence over the kernel command line option
|
||||
`net.naming-scheme=`, except if the value is prefixed with `:` in which case
|
||||
the kernel command line option takes precedence, if it is specified as well.
|
||||
|
||||
installed systemd tests:
|
||||
|
||||
* `$SYSTEMD_TEST_DATA` — override the location of test data. This is useful if
|
||||
|
||||
Reference in New Issue
Block a user