aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorPetr Horáček <phoracek@redhat.com>2017-01-30 18:48:10 +0100
committerLukas Nykryn <lnykryn@redhat.com>2017-02-14 19:01:31 +0100
commit5329e1457eb6be7121eeee3a4e18bbe82d6ea460 (patch)
tree8c114d4216c5c97542d5e887727e0bb87b5cb40c /sysconfig
parent44b84c4b92705917f7c124b714bc93ca42e00ec3 (diff)
downloadinitscripts-5329e1457eb6be7121eeee3a4e18bbe82d6ea460.tar
initscripts-5329e1457eb6be7121eeee3a4e18bbe82d6ea460.tar.gz
initscripts-5329e1457eb6be7121eeee3a4e18bbe82d6ea460.tar.bz2
initscripts-5329e1457eb6be7121eeee3a4e18bbe82d6ea460.tar.xz
initscripts-5329e1457eb6be7121eeee3a4e18bbe82d6ea460.zip
network: load NetworkManager connection via dbus
Use dbus to refresh configuration files for NetworkManager in order to make ifup and ifdown faster.
Diffstat (limited to 'sysconfig')
-rw-r--r--sysconfig/network-scripts/network-functions10
1 files changed, 9 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index c1da9888..8a79802c 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -171,7 +171,7 @@ source_config ()
ISALIAS=no
fi
if is_nm_running && [ "$REALDEVICE" != "lo" ] ; then
- nmcli con load "/etc/sysconfig/network-scripts/$CONFIG"
+ nm_con_load "$CONFIG"
if ! is_false $NM_CONTROLLED; then
UUID=$(get_uuid_by_config $CONFIG)
[ -n "$UUID" ] && _use_nm=true
@@ -179,6 +179,14 @@ source_config ()
fi
}
+nm_con_load () {
+ dbus-send --system --print-reply \
+ --dest=org.freedesktop.NetworkManager \
+ /org/freedesktop/NetworkManager/Settings \
+ org.freedesktop.NetworkManager.Settings.LoadConnections \
+ array:string:"/etc/sysconfig/network-scripts/${1}" >/dev/null 2>&1
+}
+
ethtool_set()
{
oldifs=$IFS;