However, all is not gold with Deepin as well, as when using a .link file
in /etc/systemd/network to rename the interface, Deeping as well does
not work any more. Here, eth0 aka enp0s3 aka custom lan-01:
# journalctl -b0 | grep -E 'sysctl|lan-01|enp0s3|eth0'
May 22 22:31:22 test1-PC kernel: Yama: disabled by default; enable with
sysctl kernel.yama.*
May 22 22:31:22 test1-PC kernel: virtio_net virtio0 enp0s3: renamed from
eth0
May 22 22:31:22 test1-PC systemd-sysctl[259]: Couldn't write
'840b:b3d7:8121:5774:b967:1737:db42:a87b' to
'net/ipv6/conf/lan-01/stable_secret', ignoring: No such file or directory
May 22 22:31:22 test1-PC systemd-sysctl[259]: Couldn't write '2' to
'net/ipv6/conf/lan-01/addr_gen_mode', ignoring: No such file or directory
May 22 22:31:22 test1-PC kernel: virtio_net virtio0 lan-01: renamed from
enp0s3
May 22 22:31:22 test1-PC systemd-networkd[267]: enp0s3: Interface name
change detected, enp0s3 has been renamed to lan-01.
May 22 22:31:22 test1-PC systemd-networkd[267]: lan-01: Gained carrier
So we have the renaming from kernel ethx to sytemd persistent, then
systemd-sysctl, and then again the renaming from the systemd persistent
to the user defined .link file.
Same is true, when using an udev rule to customly rename an interface
instead of a .link file:
root@test1-PC:~# journalctl -b0 | grep -E 'sysctl|lan-01|enp0s3|eth0'
May 22 22:41:01 test1-PC kernel: Yama: disabled by default; enable with
sysctl kernel.yama.*
May 22 22:41:01 test1-PC kernel: virtio_net virtio0 enp0s3: renamed from
eth0
May 22 22:41:01 test1-PC systemd-sysctl[258]: Couldn't write
'840b:b3d7:8121:5774:b967:1737:db42:a87b' to
'net/ipv6/conf/lan-01/stable_secret', ignoring: No such file or directory
May 22 22:41:01 test1-PC systemd-sysctl[258]: Couldn't write '2' to
'net/ipv6/conf/lan-01/addr_gen_mode', ignoring: No such file or directory
May 22 22:41:01 test1-PC kernel: virtio_net virtio0 lan-01: renamed from
enp0s3
May 22 22:41:01 test1-PC systemd-networkd[263]: enp0s3: Interface name
change detected, enp0s3 has been renamed to lan-01.
May 22 22:41:01 test1-PC systemd-networkd[263]: lan-01: Gained carrier
Am 22.05.20 um 21:50 schrieb Ede Wolf:
That sounds like actual bug. What systemd version do you use?
I've just did a test with Deepin, as I've had VM flying around of that
debian based distribution, and here it seems to work, using systemd 241
instead of 245. systemd-sysctl is clearly called after the renaming:
May 22 21:48:46 test1-PC kernel: Yama: disabled by default; enable with
sysctl kernel.yama.*
May 22 21:48:46 test1-PC kernel: virtio_net virtio0 enp0s3: renamed from
eth0
May 22 21:48:46 test1-PC systemd-sysctl[259]: Couldn't write
'840b:b3d7:8121:5774:b967:1737:db42:a87b' to
'net/ipv6/conf/eth0/stable_secret', ignoring: No such file or directory
May 22 21:48:46 test1-PC systemd-sysctl[259]: Couldn't write '2' to
'net/ipv6/conf/eth0/addr_gen_mode', ignoring: No such file or directory
May 22 21:48:46 test1-PC systemd-sysctl[259]: Couldn't write '2' to
'net/ipv6/conf/eth0/use_tempaddr', ignoring: No such file or directory
May 22 21:48:46 test1-PC systemd-networkd[263]: enp0s3: Gained carrier
So here eth0 is the invalid interface, as it should be.
Not sure now wether this a regression or distribution specific. Where
are the dependencies defined what service runs first at this early stage?
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel