> because configuration in /lib/modprobe.d/ overrides configuration in
/etc/modprobe.d/
well, not quite.
kmod reads files from the dirs in this order:
/run/modprobe.d/
/etc/modprobe.d/
/lib/modprobe.d/
any duplicate files, with the exact same name in multiple directories,
will ignore the same-named file from later dirs (e.g. as you noticed,
/etc/modprobe.d/systemd.conf will override
/lib/modprobe.d/systemd.conf).
However, once all files are loaded and duplicates removed/ignored, kmod
will process the files in lexical - i.e. alphabetical, using strcmp() -
order.
Since your filename 'local-dummy.conf' is lexically before
'systemd.conf', its content is processed before the content in
systemd.conf; thus, your setting is replaced[1]. If you rename your file
to any (unique) filename that's lexically *after* systemd.conf, your
setting will be used, not the setting in the 'systemd.conf' file.
Is that obvious? No. In the man page? Not that I see, and it probably
should be, but that should be discussed with upstream for kmod.
(1) - note that your setting isn't actually being *replaced*, what modprobe is
doing is *appending* each new module option. So when your file is lexically
before systemd.conf, what's happening is actually:
$ sudo modprobe -v dummy
insmod /lib/modules/5.4.0-77-generic/kernel/drivers/net/dummy.ko numdummies=0
$ ip l show dummy0
Device "dummy0" does not exist.
$ sudo rmmod dummy
$ echo "options dummy numdummies=1" | sudo tee /etc/modprobe.d/a.conf
options dummy numdummies=1
$ sudo modprobe -v dummy
insmod /lib/modules/5.4.0-77-generic/kernel/drivers/net/dummy.ko numdummies=1
numdummies=0
$ ip l show dummy0
Device "dummy0" does not exist.
$ sudo rmmod dummy
$ sudo mv /etc/modprobe.d/a.conf /etc/modprobe.d/z.conf
$ sudo modprobe -v dummy
insmod /lib/modules/5.4.0-77-generic/kernel/drivers/net/dummy.ko numdummies=0
numdummies=1
$ ip l show dummy0
216: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT
group default qlen 1000
link/ether f6:25:71:17:bb:ae brd ff:ff:ff:ff:ff:ff
$ sudo rmmod dummy
$ sudo rm /etc/modprobe.d/z.conf
$ sudo modprobe -v dummy
insmod /lib/modules/5.4.0-77-generic/kernel/drivers/net/dummy.ko numdummies=0
$ ip l show dummy0
Device "dummy0" does not exist.
** Changed in: systemd (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1937953
Title:
systemd forcibly disables use of dummy/bond interfaces
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1937953/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs