From ed6ffcb2e2b4a72f8dcbe500b6887de8fa8dd361 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Wed, 23 Mar 2022 10:03:34 +0100 Subject: [PATCH] network bootscript: Don't run ifup if route already set Otherwise, warnings are issued when changing runlevel. "ip route" is a good test of whether network is already up. If users want to change some config, they should use ifup/down, not the network bootscript. --- bootscripts/lfs/init.d/network | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootscripts/lfs/init.d/network b/bootscripts/lfs/init.d/network index 91c52e085..5b2dd9b97 100644 --- a/bootscripts/lfs/init.d/network +++ b/bootscripts/lfs/init.d/network @@ -29,6 +29,8 @@ case "${1}" in start) + # if the default route exists, network is already configured + if ip route | grep -q "^default"; then return 0; fi # Start all network interfaces for file in /etc/sysconfig/ifconfig.* do