mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01:00
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.
This commit is contained in:
parent
2539253399
commit
ed6ffcb2e2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user