systemd: don't make NetworkManager D-Bus activatable
If the NetworkManager daemon has been stopped manually we don't want it to be autostarted by a client request. [lkundrak@v3.sk: The auto-activation is probably more surprising than useful. Services that need NetworkManager API should depend on NetworkManager service directly. I have no idea what purpose does the D-Bus service file serve nowadays, but it looks rather hacky (really, activating /bin/false) and the comment in it suggests that the autoactivating behavior was not intended anyway. Debian has been shipping this for quite some time and no complains have been heard.] https://github.com/NetworkManager/NetworkManager/pull/230
This commit is contained in:

committed by
Lubomir Rintel

parent
cec7ade86c
commit
90f71c0f99
@@ -24,7 +24,6 @@ ProtectHome=read-only
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=dbus-org.freedesktop.NetworkManager.service
|
||||
Also=NetworkManager-dispatcher.service
|
||||
|
||||
# We want to enable NetworkManager-wait-online.service whenever this service
|
||||
|
@@ -18,23 +18,22 @@ configure_file(
|
||||
|
||||
if install_systemd_unit_dir
|
||||
services = [
|
||||
['NetworkManager-dispatcher.service', systemd_system_unit_dir],
|
||||
['NetworkManager.service', systemd_system_unit_dir],
|
||||
['org.freedesktop.NetworkManager.service', dbus_sys_dir]
|
||||
'NetworkManager-dispatcher.service',
|
||||
'NetworkManager.service',
|
||||
]
|
||||
|
||||
if have_systemd_200
|
||||
services += [['NetworkManager-wait-online.service', systemd_system_unit_dir]]
|
||||
services += ['NetworkManager-wait-online.service']
|
||||
else
|
||||
services += [['NetworkManager-wait-online-systemd-pre200.service', systemd_system_unit_dir]]
|
||||
services += ['NetworkManager-wait-online-systemd-pre200.service']
|
||||
endif
|
||||
|
||||
foreach service: services
|
||||
configure_file(
|
||||
input: service[0] + '.in',
|
||||
output: service[0],
|
||||
input: service + '.in',
|
||||
output: service,
|
||||
install: true,
|
||||
install_dir: service[1],
|
||||
install_dir: systemd_system_unit_dir,
|
||||
configuration: data_conf
|
||||
)
|
||||
endforeach
|
||||
|
@@ -1,11 +0,0 @@
|
||||
# This D-Bus service activation file is only for systemd support since
|
||||
# an auto-activated NetworkManager would be quite surprising for those people
|
||||
# who have NM installed but turned off. Thus the Exec path available to
|
||||
# D-Bus is /bin/false, but systemd knows the real Exec path due to the NM
|
||||
# systemd .service file.
|
||||
|
||||
[D-BUS Service]
|
||||
Name=org.freedesktop.NetworkManager
|
||||
Exec=/bin/false
|
||||
User=root
|
||||
SystemdService=dbus-org.freedesktop.NetworkManager.service
|
Reference in New Issue
Block a user