From 53d348049c41b01a78f325473c16de1c135a79c3 Mon Sep 17 00:00:00 2001 From: Joshua-Riek Date: Sat, 23 Sep 2023 11:15:22 -0400 Subject: [PATCH] workaround for 120 second timeout bug with ubuntu server #366 --- .../systemd-networkd-wait-online.service.d/override.conf | 3 +++ scripts/build-rootfs.sh | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 overlay/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf diff --git a/overlay/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf b/overlay/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf new file mode 100644 index 00000000..bb2ff011 --- /dev/null +++ b/overlay/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=/lib/systemd/systemd-networkd-wait-online --timeout=10 diff --git a/scripts/build-rootfs.sh b/scripts/build-rootfs.sh index 56109cae..c7c3ea1a 100755 --- a/scripts/build-rootfs.sh +++ b/scripts/build-rootfs.sh @@ -211,9 +211,13 @@ cp ${overlay_dir}/usr/share/initramfs-tools/hooks/rtl-bt ${chroot_dir}/usr/share cp ${overlay_dir}/usr/lib/systemd/system/rtc-hym8563.service ${chroot_dir}/usr/lib/systemd/system/rtc-hym8563.service # Set term for serial tty -mkdir -p ${chroot_dir}/lib/systemd/system/serial-getty@.service.d +mkdir -p ${chroot_dir}/lib/systemd/system/serial-getty@.service.d/ cp ${overlay_dir}/usr/lib/systemd/system/serial-getty@.service.d/10-term.conf ${chroot_dir}/usr/lib/systemd/system/serial-getty@.service.d/10-term.conf +# Fix 120 second timeout bug +mkdir -p ${chroot_dir}/etc/systemd/system/systemd-networkd-wait-online.service.d/ +cp ${overlay_dir}/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf ${chroot_dir}/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf + # Use gzip compression for the initrd cp ${overlay_dir}/etc/initramfs-tools/conf.d/compression.conf ${chroot_dir}/etc/initramfs-tools/conf.d/compression.conf @@ -334,6 +338,9 @@ cp ${overlay_dir}/usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf cp ${overlay_dir}/usr/lib/NetworkManager/conf.d/10-override-wifi-random-mac-disable.conf ${chroot_dir}/usr/lib/NetworkManager/conf.d/10-override-wifi-random-mac-disable.conf cp ${overlay_dir}/usr/lib/NetworkManager/conf.d/20-override-wifi-powersave-disable.conf ${chroot_dir}/usr/lib/NetworkManager/conf.d/20-override-wifi-powersave-disable.conf +# Ubuntu desktop uses a diffrent network manager, so remove this systemd override +rm -rf ${chroot_dir}/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf + # Enable wayland session cp ${overlay_dir}/etc/gdm3/custom.conf ${chroot_dir}/etc/gdm3/custom.conf