You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
979 B
32 lines
979 B
From 63e75dc4cdb14e392e38a8973126c9a29b266411 Mon Sep 17 00:00:00 2001 |
|
From: Harald Hoyer <harald@redhat.com> |
|
Date: Thu, 10 Sep 2015 13:20:18 +0200 |
|
Subject: [PATCH] network: add all_ifaces_setup() |
|
|
|
all_ifaces_up() is true, if all interfaces are up. |
|
|
|
all_ifaces_setup() is true, if all interfaces are up and the gateways |
|
and nameserver are setup. |
|
--- |
|
modules.d/40network/net-lib.sh | 8 ++++++++ |
|
1 file changed, 8 insertions(+) |
|
|
|
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh |
|
index 9d22ec1c..60d3579a 100755 |
|
--- a/modules.d/40network/net-lib.sh |
|
+++ b/modules.d/40network/net-lib.sh |
|
@@ -74,6 +74,14 @@ all_ifaces_up() { |
|
done |
|
} |
|
|
|
+all_ifaces_setup() { |
|
+ local iface="" IFACES="" |
|
+ [ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces |
|
+ for iface in $IFACES; do |
|
+ [ -e /tmp/net.$iface.did-setup ] || return 1 |
|
+ done |
|
+} |
|
+ |
|
get_netroot_ip() { |
|
local prefix="" server="" rest="" |
|
splitsep "$1" ":" prefix server rest
|
|
|