From f8649b7b64c00d9cfe4e92e01f330cbc6cec7d8c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 12 2017 10:05:12 +0000 Subject: import initscripts-9.49.37-1.el7_3.1 --- diff --git a/SOURCES/initscripts-9.03.58-use-dbus-instead-of-nmcli.patch b/SOURCES/initscripts-9.03.58-use-dbus-instead-of-nmcli.patch new file mode 100644 index 0000000..e486ce3 --- /dev/null +++ b/SOURCES/initscripts-9.03.58-use-dbus-instead-of-nmcli.patch @@ -0,0 +1,73 @@ +From 44b84c4b92705917f7c124b714bc93ca42e00ec3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20Hor=C3=A1=C4=8Dek?= +Date: Mon, 30 Jan 2017 18:47:11 +0100 +Subject: [PATCH 1/2] network: check for running NetworkManager via dbus + +Use dbus instead of nmcli to make ifup command faster. +--- + sysconfig/network-scripts/network-functions | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions +index 9cca982..c1da988 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 () +-- +2.9.3 + + +From 5329e1457eb6be7121eeee3a4e18bbe82d6ea460 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20Hor=C3=A1=C4=8Dek?= +Date: Mon, 30 Jan 2017 18:48:10 +0100 +Subject: [PATCH 2/2] network: load NetworkManager connection via dbus + +Use dbus to refresh configuration files for NetworkManager in order +to make ifup and ifdown faster. +--- + sysconfig/network-scripts/network-functions | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions +index c1da988..8a79802 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; +-- +2.9.3 + diff --git a/SPECS/initscripts.spec b/SPECS/initscripts.spec index 14e8071..f8b7096 100644 --- a/SPECS/initscripts.spec +++ b/SPECS/initscripts.spec @@ -4,7 +4,7 @@ Version: 9.49.37 # ppp-watch is GPLv2+, everything else is GPLv2 License: GPLv2 and GPLv2+ Group: System Environment/Base -Release: 1%{?dist} +Release: 1%{?dist}.1 URL: http://fedorahosted.org/releases/i/n/initscripts/ Source: http://fedorahosted.org/releases/i/n/initscripts/initscripts-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -35,6 +35,8 @@ Requires(preun): /sbin/chkconfig BuildRequires: glib2-devel popt-devel gettext pkgconfig Provides: /sbin/service +Patch001: initscripts-9.03.58-use-dbus-instead-of-nmcli.patch + %description The initscripts package contains basic system scripts used during a boot of the system. It also contains scripts which @@ -53,6 +55,7 @@ Currently, this consists of various memory checking code. %prep %setup -q +%patch001 -p1 %build make @@ -218,6 +221,9 @@ rm -rf $RPM_BUILD_ROOT /etc/profile.d/debug* %changelog +* Thu Feb 16 2017 David Kaspar [Dee'Kej] - 9.49.37-1.el7_3.1 +- use DBUS calls directly instead of calling nmcli (bug #1422820) + * Mon Sep 12 2016 Lukáš Nykrýn - 9.49.37-1 - rhel-import-state: fix broken order of parameters