Commit graph

27 commits

Author SHA1 Message Date
Dan Williams 4cc13befd3 dispatcher: rename executable to 'nm-dispatcher' 2014-06-06 13:43:45 -05:00
Thomas Haller 16d34bfe82 build: fix installing network-online.target for existing link
When reinstalling NM on the same location, it would fail with

    Making install in data
    make[1]: Entering directory `/home/data/src/NetworkManager/data'
    make[2]: Entering directory `/home/data/src/NetworkManager/data'
    install -d /opt/test/lib/systemd/system/network-online.target.wants
    ln -s /opt/test/lib/systemd/system/NetworkManager-wait-online.service /opt/test/lib/systemd/system/network-online.target.wants
    ln: failed to create symbolic link ‘/opt/test/lib/systemd/system/network-online.target.wants/NetworkManager-wait-online.service’: File exists
    make[2]: *** [install-exec-local] Error 1

https://bugzilla.gnome.org/show_bug.cgi?id=728965

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-02 16:05:46 +02:00
Pavel Šimerda afd30f5f3b implement systemd network-online.target properly (bgo #728965)
Make network-online.target depend on NetworkManager-wait-online.service
just as is done in Fedora. This makes network-online.target work with
NetworkManager as described in systemd documentation.

An alternative way would be to use a combination of setting
Install.WantedBy to network-online.target and enabling the service by
default. This alternative approach is currently used by
systemd-networkd.

https://bugzilla.gnome.org/show_bug.cgi?id=728965

Acked-By: Dan Williams <dcbw@redhat.com>
2014-05-30 22:23:08 +02:00
Dan Winship d53357f420 dispatcher: tell systemd to not kill dispatcher children
You're supposed to be able to use dispatcher scripts to spawn
long-running processes, but currently systemd will kill them when
nm-dispatcher exits. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=725492
2014-04-18 11:32:12 -04:00
Jiří Klimeš 520d2814ba systemd: update NetworkManager-wait-online.service to wait for startup 2014-03-31 08:37:10 +02: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 Winship 17e91fd46a core: change the rules for ignore-carrier
The previous ignore-carrier rules did not work well with dynamic IP
(dhcp/slaac) connections. Change the rule so that only static IP
connections can be activated when carrier is not present (but both
static and dynamic connections will remain up when carrier is lost).
2013-07-22 11:30:21 -04:00
Colin Walters 841ca9bb84 server.conf: We're no longer a sample, reword introduction
Now we actually change configuration, explain that better.
2013-07-22 11:30:21 -04:00
Colin Walters 8e37935875 Merge some comments from server.conf into "man NetworkManager.conf"
The latter should have the full+canonical description, and the config
file comments should be very brief, and link to it for more info.
2013-07-22 11:30:21 -04:00
Colin Walters 31d1f288f5 server.conf: Remove dns=none example
This is covered in the manpage adequately, and we want this file to be
actual options now, not just commented out ones.
2013-07-22 11:30:21 -04:00
Dan Winship 328dea9c5c core: make monitor-connection-files be false by default 2013-07-22 11:30:21 -04:00
Dan Winship 1f81851017 core: add monitor-connection-files=false and ReloadConnections
Add a "monitor-connection-files" config option, which can be set to
"false" to disable automatic reloading of connections on file change.

To go with this, add a new ReloadConnections method on
o.fd.NM.Settings that can be used to manually reload connections, and
add an nm-cli command to call it.
2013-06-14 12:57:47 -03: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 Williams 06a415d9ea systemd: add service for dispatcher (rh #948433) 2013-06-03 10:53:07 -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
Colin Walters 8b3d609404 build: Fix srcdir != builddir 2013-04-03 10:19:49 -05:00
Dan Winship 08e7fda63d data: add a server.conf example file
Add a server.conf example file, and install it to $(docdir)/examples.
2013-04-03 10:23:49 -04: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
Michal Schmidt ffbb7df4b8 systemd: fix NetworkManager-wait-online.service to wait for link up (rh #710502)
Since commit 0ce4b6b412
NetworkManager-wait-online.service quits immediately if there is no link yet.
Fix it by removing the '-x' option.

But if we do just that, NM-w-o would add a useless 30 seconds delay in the
case when NM is not running at all.
Solve this by adding a Requisite= dependency on NM.

https://bugzilla.redhat.com/show_bug.cgi?id=710502
2011-06-17 14:02:39 +02:00
Bill Nottingham 0ce4b6b412 systemd: tweak NM-wait-online.service
1) Don't require NM, but run after it. This allows this service
to be installed without bringing up NetworkManager. Add -x so that
it exits if NM isn't running.

2) Install as a want of network.target, instead of multi-user.target.
This allows us to skip it if nothing requires network.target or the
legacy $network SysV capability.
2011-05-10 16:34:11 -05: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