diff options
author | Petr Horáček <phoracek@redhat.com> | 2017-01-30 18:48:10 +0100 |
---|---|---|
committer | Lukáš Nykrýn <lnykryn@redhat.com> | 2017-02-14 18:57:12 +0100 |
commit | edcc7e730a0370f41cd4961f632e7590cbaa084f (patch) | |
tree | 088e78e93b1a694fe56dfafe2764feaf443f710f /sysconfig | |
parent | 0c48e8d8a32c6db7f5c5c2a20355d0f3d76deda9 (diff) | |
download | initscripts-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-functions | 10 |
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; |