Bug#793374: systemd: Does not honour /etc/systemd/network/*.link

Michael Biebl biebl at debian.org
Thu Jul 23 13:24:45 BST 2015


Am 23.07.2015 um 14:07 schrieb Julian Wollrath:
> Package: systemd
> Version: 222-2
> Severity: normal
> 
> Dear Maintainer,
> 
> I change my network device names via an .link definition in
> /etc/systemd/network/01-ethernet.link with the following content:
>     [Match]
>     MACAddress=xx:xx:xx:xx:xx:xx
>     OriginalName=eth*
>     Driver=e1000e
> 
>     [Link]
>     Name=eth0
> 
> The update to systemd 222-2 broke that. The device gets renamed to
> enp0s25, disregarding the .link file. A look at the logs shows, that
> this happens, before the root filesystem is mounted, so when the system
> is still controlled by the initramfs. The manpage of systemd.link says,
> that everything in /etc/systemd/network/*.link takes precedence over
> /lib/systemd/network and others. Hence, the content
> of /etc/system/network should also be contained in the initramfs, so
> that this is true.

The problem might be, that we don't know, which link files to copy.
We will need to check, if it's actually safe to copy all of 
/etc/systemd/network/*.link into the initramfs.

For now, I suggest you create a custom hook for your custom configuration like this:


$ cat /etc/initramfs-tools/hooks/link 
#!/bin/sh -e
PREREQS=""
case $1 in
        prereqs) echo "${PREREQS}"; exit 0;;
esac
. /usr/share/initramfs-tools/hook-functions

mkdir -p $DESTDIR/lib/systemd/network/
cp -p /etc/systemd/network/01-ethernet.link $DESTDIR/lib/systemd/network/

Then make the script executable and run update-initramfs -u

Regards,
Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20150723/581db064/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list