diff options
author | Bill Nottingham <notting@redhat.com> | 2010-02-16 14:06:16 -0500 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2010-03-01 16:03:36 -0500 |
commit | 7623065694b1b84bf99f2425ff91cf5655e4d981 (patch) | |
tree | b5280d6cd3952ca06c2312d655eaf772056774dc | |
parent | 9c4b5b4c2f2105e99377719b78631b357dfc2e3d (diff) | |
download | initscripts-7623065694b1b84bf99f2425ff91cf5655e4d981.tar initscripts-7623065694b1b84bf99f2425ff91cf5655e4d981.tar.gz initscripts-7623065694b1b84bf99f2425ff91cf5655e4d981.tar.bz2 initscripts-7623065694b1b84bf99f2425ff91cf5655e4d981.tar.xz initscripts-7623065694b1b84bf99f2425ff91cf5655e4d981.zip |
Add a function that determines the status of NetworkManager; use it.
-rw-r--r-- | sysconfig/network-scripts/network-functions | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 96df715b..313e42fd 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -138,6 +138,7 @@ source_config () else ISALIAS=no fi + is_nm_running && USE_NM=true } @@ -190,6 +191,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 () { |