From ea3f4ec5ac55cfa789510c7efe480edeba204c18 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 3 Feb 2023 12:22:16 +0100 Subject: [dhcpc-busybox] Don't wait for dhcp on br0 anymore We did this to avoid issues if the hostname changes after Xorg started up. But sometimes, DHCP is really slow, and we delay the startup of the login screen by a good 10 seconds. Avoid this by instead just touching the flag file that prevents the udhcpc trigger script from changing the hostname. Running with a potentially wrong hostname should be an acceptable tradeoff. --- .../network.target.wants/slx-wait-primary-dhcp.service | 1 - .../etc/systemd/system/slx-wait-primary-dhcp.service | 7 ------- .../data/opt/openslx/scripts/systemd-wait_primary_dhcp | 18 ------------------ 3 files changed, 26 deletions(-) delete mode 120000 core/modules/slx-network-configs-targets/data/etc/systemd/system/network.target.wants/slx-wait-primary-dhcp.service delete mode 100644 core/modules/slx-network-configs-targets/data/etc/systemd/system/slx-wait-primary-dhcp.service delete mode 100755 core/modules/slx-network-configs-targets/data/opt/openslx/scripts/systemd-wait_primary_dhcp (limited to 'core/modules/slx-network-configs-targets') diff --git a/core/modules/slx-network-configs-targets/data/etc/systemd/system/network.target.wants/slx-wait-primary-dhcp.service b/core/modules/slx-network-configs-targets/data/etc/systemd/system/network.target.wants/slx-wait-primary-dhcp.service deleted file mode 120000 index e7f32c14..00000000 --- a/core/modules/slx-network-configs-targets/data/etc/systemd/system/network.target.wants/slx-wait-primary-dhcp.service +++ /dev/null @@ -1 +0,0 @@ -../slx-wait-primary-dhcp.service \ No newline at end of file diff --git a/core/modules/slx-network-configs-targets/data/etc/systemd/system/slx-wait-primary-dhcp.service b/core/modules/slx-network-configs-targets/data/etc/systemd/system/slx-wait-primary-dhcp.service deleted file mode 100644 index 68dc13f7..00000000 --- a/core/modules/slx-network-configs-targets/data/etc/systemd/system/slx-wait-primary-dhcp.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Wait until DHCP for the primary NIC has finished -Before=network.target - -[Service] -Type=oneshot -ExecStart=/opt/openslx/scripts/systemd-wait_primary_dhcp diff --git a/core/modules/slx-network-configs-targets/data/opt/openslx/scripts/systemd-wait_primary_dhcp b/core/modules/slx-network-configs-targets/data/opt/openslx/scripts/systemd-wait_primary_dhcp deleted file mode 100755 index 3e452549..00000000 --- a/core/modules/slx-network-configs-targets/data/opt/openslx/scripts/systemd-wait_primary_dhcp +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/ash - -flag="/run/network/primary-dhcp.flag" -readonly flag -w=0 - -# Wait a maximum of 10 seconds for the flag file -while ! [ -e "$flag" ] && [ "$w" -lt 10 ]; do - let w++ - sleep 1 -done - -# Then touch it anyways, this will prevent the DHCP -# trigger script from changing the hostname later on -mkdir -p /run/network -touch "$flag" - -exit 0 -- cgit v1.2.3-55-g7522