diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2014-02-27 11:44:46 +0100 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2014-03-11 14:17:17 +0100 |
commit | 2f00d21f7d0bf74de4d06d26a4475b91da90a4f7 (patch) | |
tree | 2220309d32d25aaee43736bafba3693bd65f26c5 | |
parent | fc38d5eead7a1477c6fe580b224c7a6e113d52fe (diff) | |
download | initscripts-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-x | rc.d/init.d/network | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup | 1 | ||||
-rw-r--r-- | sysconfig/network-scripts/network-functions | 5 |
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; }' |