]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(network): two bugs which cause minutes long boot times
authortupper <tupper.bob@gmail.com>
Thu, 24 Mar 2022 13:23:20 +0000 (09:23 -0400)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Sat, 17 Dec 2022 12:29:54 +0000 (07:29 -0500)
Caused by unneeded arping to the default gateway.

modules.d/40network/net-lib.sh

index 4b972c78056e49d8eaca005f1bf18a1ceaf90bf8..1c8f312687a4c51915a446b7ff6779c365caca84 100755 (executable)
@@ -90,7 +90,7 @@ all_ifaces_setup() {
 
 get_netroot_ip() {
     local prefix="" server="" rest=""
-    splitsep "$1" ":" prefix server rest
+    splitsep ":" "$1" prefix server rest
     case $server in
         [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)
             echo "$server"
@@ -101,7 +101,8 @@ get_netroot_ip() {
 }
 
 ip_is_local() {
-    strstr "$(ip route get "$@" 2> /dev/null)" " via "
+    strstr "$(ip route get "$@" 2> /dev/null)" " via " || return 0
+    return 1
 }
 
 ifdown() {