Currently, only the default .link files from /lib/systemd/network are
copied to the initramfs, meaning, that additional (local) .link naming
definitions will be ignored when the system is still controlled by the
initramfs and interfaces might get wrong names.
Fix this by copying all .link files from /lib/systemd/network and
/etc/systemd/network into the initramfs, with the files from
/etc/systemd/network taking precedence over files with the same name
from /lib/systemd/network, as stated in the systemd.link manpage.
Closes: #793374
This avoids blocking network.target on boot with unavailable hotplug
interfaces in /etc/network/interfaces. (Closes: #790669, LP: #1425376)
+ [ Julian Wollrath ]
+ * Copy all .link interface naming definitions to initramfs. (Closes: #793374)
+
-- Michael Biebl <biebl@debian.org> Tue, 21 Jul 2015 22:24:51 +0200
systemd (222-2) unstable; urgency=medium
mkdir -p $DESTDIR/etc/udev
cp -p /etc/udev/udev.conf $DESTDIR/etc/udev/
+# copy .link files containing interface naming definitions
mkdir -p $DESTDIR/lib/systemd/network/
-for link in 01-mac-for-usb.link 99-default.link; do
- if [ -e /etc/systemd/network/$link ]; then
- cp -p /etc/systemd/network/$link $DESTDIR/lib/systemd/network/
- elif [ -e /lib/systemd/network/$link ]; then
- cp -p /lib/systemd/network/$link $DESTDIR/lib/systemd/network/
- fi
-done
+find /lib/systemd/network /etc/systemd/network -name '*.link' -execdir cp -pt $DESTDIR/lib/systemd/network/ '{}' +
mkdir -p $DESTDIR/lib/udev/rules.d/
for rules in 50-firmware.rules 50-udev-default.rules 60-persistent-storage.rules \