From e285dda70b15d98cd4bfa1f34b8ae82f7b0dcfac Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Wed, 9 Oct 2024 20:07:29 -0700 Subject: [PATCH] Disable systemd-networkd-wait-online.service systemd-networkd-wait-online fails when no interfaces are managed by systemd-networkd (systemd/systemd#25813): $ SYSTEMD_LOG_LEVEL=debug /usr/lib/systemd/systemd-networkd-wait-online Found link lo(1) Found link eth0(108) eth0: link is not managed by networkd. lo: link is ignored Timeout occurred while waiting for network connectivity. Per the maintainer response to systemd/systemd#29388, it should simply be disabled in this situation. --- build.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 2918db5..2fc11e8 100755 --- a/build.sh +++ b/build.sh @@ -43,12 +43,10 @@ systemctl --root=$mnt disable tpm-udev.path # Slice rootfs config out of fstab, since LABEL=cloudimg-rootfs doesn't exist in the container environment and systemd-remount-fs.service complains about not being able to find it chroot $mnt /bin/sed -i '/LABEL=cloudimg-rootfs/d' /etc/fstab -# Networking setup is expected to not actually cross a network boundary (i.e. only talk to the container host), so decrease the timeout because all operations here should be fast -mkdir $mnt/etc/systemd/system/systemd-networkd-wait-online.service.d/ -cat > $mnt/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf < $mnt/etc/systemd/system/ssh-hostkey-generate.service <