aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorPetr Horáček <phoracek@redhat.com>2017-01-30 18:47:11 +0100
committerLukas Nykryn <lnykryn@redhat.com>2017-02-14 19:01:26 +0100
commit44b84c4b92705917f7c124b714bc93ca42e00ec3 (patch)
treede9e31934822e24d98447286a3be411393e9fdb9 /sysconfig
parent176ff8e6cacf9d45fbf876cb8aee775313385c6e (diff)
downloadinitscripts-44b84c4b92705917f7c124b714bc93ca42e00ec3.tar
initscripts-44b84c4b92705917f7c124b714bc93ca42e00ec3.tar.gz
initscripts-44b84c4b92705917f7c124b714bc93ca42e00ec3.tar.bz2
initscripts-44b84c4b92705917f7c124b714bc93ca42e00ec3.tar.xz
initscripts-44b84c4b92705917f7c124b714bc93ca42e00ec3.zip
network: check for running NetworkManager via dbus
Use dbus instead of nmcli to make ifup command faster.
Diffstat (limited to 'sysconfig')
-rw-r--r--sysconfig/network-scripts/network-functions6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 9cca9824..c1da9888 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -275,7 +275,11 @@ do_netreport ()
is_nm_running ()
{
- [ "$(LANG=C nmcli -t --fields running general status 2>/dev/null)" = "running" ]
+ dbus-send --system --print-reply \
+ --dest=org.freedesktop.DBus \
+ /org/freedesktop/DBus \
+ org.freedesktop.DBus.GetNameOwner \
+ string:"org.freedesktop.NetworkManager" >/dev/null 2>&1
}
is_nm_active ()