From e421e938ffb5aca694583753872029cf5f3d2e74 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 25 Jan 2023 17:35:14 +0100 Subject: [PATCH] board/common: ensure dhcpcd backgrounds immediately for quicker boot Signed-off-by: Joachim Wiberg --- board/common/post-build.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/board/common/post-build.sh b/board/common/post-build.sh index b3ab0059..745d1269 100755 --- a/board/common/post-build.sh +++ b/board/common/post-build.sh @@ -21,3 +21,14 @@ if [ -L "$TARGET_DIR/etc/dropbear" ]; then rm "$TARGET_DIR/etc/dropbear" mkdir "$TARGET_DIR/etc/dropbear" fi + +if [ -f "$TARGET_DIR/etc/dhcpcd.conf" ]; then + if grep -vq background "$TARGET_DIR/etc/dhcpcd.conf"; then + cat <<-EOF >> "$TARGET_DIR/etc/dhcpcd.conf" + + # Background immediately, do not wait for DHCP lease (speed up boot process) + background + + EOF + fi +fi