fix NetworkManager restarting service on dependency failure

This commit is contained in:
yu_boyun 2020-12-10 10:03:45 +08:00
parent fc6dd7cbe4
commit 1a9fa050ed
2 changed files with 20 additions and 2 deletions

View File

@ -47,7 +47,7 @@
Name: NetworkManager
Version: 1.26.2
Epoch: 1
Release: 2
Release: 3
Summary: Network Link Manager and User Applications
License: GPLv2+
URL: https://www.gnome.org/projects/NetworkManager/
@ -55,7 +55,8 @@ Source: https://download.gnome.org/sources/NetworkManager/%{real_versi
Source1: NetworkManager.conf
Source2: 00-server.conf
# PATCH-FEATURE-FIX fix-wants-and-add-requires.patch --fix wants and add requires in the file of NetworkManager.service.in
Patch9000: fix-wants-and-add-requires.patch
Patch1: fix-wants-and-add-requires.patch
Patch2: bugfix-NetworkManager-restarting-service-on-dependency-failure.patch
BuildRequires: gcc libtool pkgconfig automake autoconf intltool gettext-devel ppp-devel gnutls-devel
BuildRequires: dbus-devel dbus-glib-devel glib2-devel gobject-introspection-devel jansson-devel
@ -406,6 +407,12 @@ fi
%{_datadir}/gtk-doc/html/NetworkManager/*
%changelog
* Thu Dec 10 2020 yuboyun <yuboyun@huawei.com> - 1.26.2-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix NetworkManager restarting service on dependency failure
* Mon Nov 09 2020 xihaochen <xihaochen@huawei.com> - 1.26.2-2
- Type:requirement
- CVE:NA

View File

@ -0,0 +1,11 @@
--- NetworkManager-1.26.0/data/NetworkManager.service.in
+++ NetworkManager-1.26.0/data/NetworkManager.service.in
@@ -12,6 +12,8 @@
#ExecReload=/bin/kill -HUP $MAINPID
ExecStart=@sbindir@/NetworkManager --no-daemon
Restart=on-failure
+RestartSec=10s
+
# NM doesn't want systemd to kill its children for it
KillMode=process
CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_MODULE CAP_AUDIT_WRITE CAP_KILL CAP_SYS_CHROOT