aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2010-02-16 14:06:16 -0500
committerBill Nottingham <notting@redhat.com>2010-04-09 16:35:37 -0400
commitcdeec66b8611b1ebf034ca3a0c8ab0a05ddbf82e (patch)
tree1b20e5cefe25d5f6b911c3feac62cc530dfad6ad
parentb116fe45d22e30f9d5c5ef4ceea021dbf948b774 (diff)
downloadinitscripts-cdeec66b8611b1ebf034ca3a0c8ab0a05ddbf82e.tar
initscripts-cdeec66b8611b1ebf034ca3a0c8ab0a05ddbf82e.tar.gz
initscripts-cdeec66b8611b1ebf034ca3a0c8ab0a05ddbf82e.tar.bz2
initscripts-cdeec66b8611b1ebf034ca3a0c8ab0a05ddbf82e.tar.xz
initscripts-cdeec66b8611b1ebf034ca3a0c8ab0a05ddbf82e.zip
Add a function that determines the status of NetworkManager; use it.
-rw-r--r--sysconfig/network-scripts/network-functions6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index d5c4bbd5..b6a9e1e4 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -132,6 +132,7 @@ source_config ()
else
ISALIAS=no
fi
+ is_nm_running && USE_NM=true
}
@@ -184,6 +185,11 @@ do_netreport ()
)
}
+is_nm_running ()
+{
+ LANG=C nmcli nm status | grep -Eq "NM running:[[:space:]]+running"
+}
+
# Sets $alias to the device module if $? != 0
is_available ()
{