mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-20 08:31:47 +00:00
1d89bc0004
By default, when shutting NM down, systemd will kill everything in its cgroup. But this can cause problems (eg, NM thinking that dhclient crashed and then taking down an interface that it would otherwise have left up). Fix this by setting KillMode=process, which tells systemd to only kill NM itself, and let NM kill its children. https://bugzilla.redhat.com/show_bug.cgi?id=876218
23 lines
645 B
SYSTEMD
23 lines
645 B
SYSTEMD
[Unit]
|
|
Description=Network Manager
|
|
After=syslog.target
|
|
Wants=network.target
|
|
Before=network.target
|
|
|
|
[Service]
|
|
Type=dbus
|
|
BusName=org.freedesktop.NetworkManager
|
|
ExecStart=@sbindir@/NetworkManager --no-daemon
|
|
# Suppress stderr to eliminate duplicated messages in syslog. NM calls openlog()
|
|
# with LOG_PERROR when run in foreground. But systemd redirects stderr to
|
|
# syslog by default, which results in logging each message twice.
|
|
StandardError=null
|
|
# NM doesn't want systemd to kill its children for it
|
|
KillMode=process
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
Alias=dbus-org.freedesktop.NetworkManager.service
|
|
Also=NetworkManager-wait-online.service
|
|
|