aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorPetr Horáček <phoracek@redhat.com>2017-01-30 18:48:10 +0100
committerLukáš Nykrýn <lnykryn@redhat.com>2017-02-14 18:57:12 +0100
commitedcc7e730a0370f41cd4961f632e7590cbaa084f (patch)
tree088e78e93b1a694fe56dfafe2764feaf443f710f /sysconfig
parent0c48e8d8a32c6db7f5c5c2a20355d0f3d76deda9 (diff)
downloadinitscripts-edcc7e730a0370f41cd4961f632e7590cbaa084f.tar
initscripts-edcc7e730a0370f41cd4961f632e7590cbaa084f.tar.gz
initscripts-edcc7e730a0370f41cd4961f632e7590cbaa084f.tar.bz2
initscripts-edcc7e730a0370f41cd4961f632e7590cbaa084f.tar.xz
initscripts-edcc7e730a0370f41cd4961f632e7590cbaa084f.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 95256bed..d3b24eee 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -172,7 +172,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
@@ -180,6 +180,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;