Commit Graph

16 Commits

Author SHA1 Message Date
Lubomir Rintel
97a962a788 systemd: grant the daemon a license to kill kids
It's for their own good. Otherwise stale dnsmasq instances haunt the shared
connections.
2015-10-08 19:23:53 +02:00
Beniamino Galvani
28c231d686 systemd: require CAP_AUDIT_WRITE for NetworkManager service
We need it to write messages to kernel auditing log.
2015-08-04 09:32:12 +02:00
Lubomir Rintel
4ffd57f83d service: harden the NetworkManager service a bit
Tested with dnsmasq (ipv4.method=shared), openvpn & vpnc.

https://bugzilla.gnome.org/show_bug.cgi?id=750598
2015-07-01 16:26:15 +02:00
Thomas Haller
a858b383c3 systemd: make NetworkManager reloadable via SIGHUP
Since f9e4af2, parts of the configuration can be reloaded
by sending SIGHUP to NetworkManager. Add ExecReload option
to service file to support reloading by sending a signal.

Note that 'man 5 systemd.service' advices to use a blocking
command instead of a sending a signal. Later we should add a
D-Bus method to allow reloading synchronously. For now, this
is better then nothing.

https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00042.html
2015-04-17 18:28:50 +02:00
Mikko Rapeli
fe95185f6f core: tell systemd to restart NetworkManager.service if it exited with failure (bgo #741587)
Crashed NetworkManager.service was not restarted by systemd.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>

https://bugzilla.gnome.org/show_bug.cgi?id=741587
2014-12-16 16:21:15 -06:00
Dan Winship
7481c64ad5 systemd: add "Before=network.service" on Fedora/RHEL (rh #1034983)
On Fedora/RHEL, NetworkManager.service needs to be started before
network.service, or else network.service may try to bring up NM's
devices itself.
2013-12-17 09:45:18 -05:00
Dan Williams
75c64763f6 systemd: fix up dispatcher unit install (rh #948433)
Lennart sez:

"Oh, I wasn't aware it is short-lived only. In that case, drop the
multi-user.target bit, and just make it create the dbus alias.

[Install]
Alias=dbus-org.freedesktop.nm-dispatcher.service

And yeah, adding Also=NetworkManager-dispatcher.service to
NetworkManager.service certainly would be a good idea."
2013-08-06 15:58:55 -05:00
Dan Williams
db3ad9bc90 systemd: update for network-online.target for systemd >= 200 (rh #787314)
systemd's new network-online target abstracts the "wait until
networking is up" stuff, and NM-wait-online implements that
functionality.  Thus NM-wait-online should be ordered before
(and thus be a dependency of) network-online.
2013-06-03 11:30:35 -05:00
Dan Winship
8d44136dce main: add --debug, fix logging under systemd
When run with --no-daemon, NM used to duplicate all syslog output to
stderr, for ease of debugging. But this meant it had to tell systemd
to ignore stderr, so you wouldn't get duplicated log entries. But that
meant we lost error messages that didn't go through nm_log. (eg,
g_warning()s and g_return_if_fail()s).

Fix this by making --no-daemon no longer duplicate syslog output to
stderr, and removing the "StandardError=null" from the systemd service
file. To get the old behavior, you can use --debug instead of
--no-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=700550
2013-05-21 09:30:09 -03:00
Dan Winship
1d89bc0004 systemd: set KillMode=process
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
2013-01-04 11:53:03 -05:00
Dan Williams
c200e3fddf systemd: restore D-Bus service alias name
Mistakenly removed while merging 86f14392fc
2012-09-25 15:35:57 -05:00
Pavel Šimerda
86f14392fc systemd: also install nm-wait-online on 'systemctl enable'
Inspired by openSUSE patches. There is no need to require
user/distributor manually enable nm-wait-online.
2012-09-25 15:03:39 -05:00
Jiří Klimeš
13bba719f9 systemd: suppress logging each message twice when run via systemd (rh #751275) 2012-02-07 14:59:53 +01:00
Lennart Poettering
c4d387efb8 systemd: pull in network.service and introduce NetworkManager-wait-online.service
This pulls in network.target from NetworkManager.service (and not the
other way round), as suggested and agreed on on the systemd ML:

http://lists.freedesktop.org/archives/systemd-devel/2011-March/001692.html

This also introduces an auxiliary service
NetworkManager-wait-online.service that can be used to order a unit
after the point where the network is available. When this is enabled
with "systemd enable NetworkManager-wait-online.service" the unit
network.target will be delayed until the network is up, which is
suitable for synchronizing NFS mounts and similar to it.

https://bugzilla.redhat.com/show_bug.cgi?id=692008
2011-04-06 17:33:51 -05:00
Dan Williams
6f2cd9e959 core: more systemd service file fixes 2010-08-18 17:01:26 -05:00
Dan Williams
4b44a2bd54 core: add systemd unit support 2010-08-12 11:15:26 -05:00