aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2014-02-27 11:44:46 +0100
committerLukas Nykryn <lnykryn@redhat.com>2014-03-11 14:17:17 +0100
commit2f00d21f7d0bf74de4d06d26a4475b91da90a4f7 (patch)
tree2220309d32d25aaee43736bafba3693bd65f26c5
parentfc38d5eead7a1477c6fe580b224c7a6e113d52fe (diff)
downloadinitscripts-2f00d21f7d0bf74de4d06d26a4475b91da90a4f7.tar
initscripts-2f00d21f7d0bf74de4d06d26a4475b91da90a4f7.tar.gz
initscripts-2f00d21f7d0bf74de4d06d26a4475b91da90a4f7.tar.bz2
initscripts-2f00d21f7d0bf74de4d06d26a4475b91da90a4f7.tar.xz
initscripts-2f00d21f7d0bf74de4d06d26a4475b91da90a4f7.zip
network: try to not compete with NM during boot
-rwxr-xr-xrc.d/init.d/network2
-rwxr-xr-xsysconfig/network-scripts/ifup1
-rw-r--r--sysconfig/network-scripts/network-functions5
3 files changed, 7 insertions, 1 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index 129042f9..6f602fe4 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -8,7 +8,7 @@
#
### BEGIN INIT INFO
# Provides: $network
-# Should-Start: iptables ip6tables
+# Should-Start: iptables ip6tables NetworkManager-wait-online NetworkManager
# Short-Description: Bring up/down networking
# Description: Bring up/down networking
### END INIT INFO
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index d16eca68..278fde39 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -69,6 +69,7 @@ if [ "$_use_nm" = "true" -a -n "$UUID" ]; then
if [ "foo$2" = "fooboot" ] && [ "${TYPE}" = "Wireless" ]; then
exit 0
fi
+ is_nm_handling ${DEVICE} && exit 0
nmcli con up uuid "$UUID"
exit $?
fi
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 1e459249..09361d43 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -280,6 +280,11 @@ is_nm_active ()
LANG=C nmcli -t --fields device,state dev status 2>/dev/null | grep -q "^${1}:connected$"
}
+is_nm_handling ()
+{
+ LANG=C nmcli -t --fields device,state dev status 2>/dev/null | grep -q "^\(${1}:connected\)\|\(${1}:connecting\)$"
+}
+
is_nm_device_unmanaged ()
{
LANG=C nmcli -t --fields GENERAL dev show "${1}" 2>/dev/null | awk -F ':' '/GENERAL.STATE/ { if ($2 == "unmanaged") exit 0 ; else exit 1; }'