diff options
author | Tom Gundersen <teg@jklm.no> | 2012-04-17 18:36:43 +0200 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2012-04-18 00:13:40 +0200 |
commit | 9feac3562c132207be58ec7939c9503cf41803de (patch) | |
tree | 4a793da5c25916d1d4c83935b9541efc85f48ee4 /systemd | |
parent | e40cdd3514857d7b9d644f1ae63e44a1daadd726 (diff) | |
download | netctl-9feac3562c132207be58ec7939c9503cf41803de.tar.gz netctl-9feac3562c132207be58ec7939c9503cf41803de.tar.xz |
systemd: wait for network to come up
We need to make sure no the systemd services are only considered
started when the network is actually up. Otherwise, things relying
on the network don't know when they can start.
This means that we need to use Type=forking or Type=oneshot, and in
the case of ifplugd we must daemonize and wait for the daemon to be
ready before we continue.
Also do some minor cleanup:
- don't include env files that are not used
- don't ignore return values
Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'systemd')
-rw-r--r-- | systemd/net-auto-wired.service | 7 | ||||
-rw-r--r-- | systemd/netcfg.service | 1 |
2 files changed, 3 insertions, 5 deletions
diff --git a/systemd/net-auto-wired.service b/systemd/net-auto-wired.service index 3c5cf62..467b62e 100644 --- a/systemd/net-auto-wired.service +++ b/systemd/net-auto-wired.service @@ -4,11 +4,10 @@ Before=network.target Wants=network.target [Service] +Type=forking EnvironmentFile=/etc/conf.d/netcfg -EnvironmentFile=-/etc/ifplugd/ifplugd.conf -ExecStart=-/usr/sbin/ifplugd -i $WIRED_INTERFACE -r /etc/ifplugd/netcfg.action -fIn -u0 -d10 -ExecStop=-/usr/sbin/ifplugd -k -i $WIRED_INTERFACE -r /etc/ifplugd/netcfg.action -Type=simple +ExecStart=/usr/sbin/ifplugd -i $WIRED_INTERFACE -r /etc/ifplugd/netcfg.action -fIw -d10 +ExecStop=/usr/sbin/ifplugd -i $WIRED_INTERFACE -r /etc/ifplugd/netcfg.action -k [Install] WantedBy=multi-user.target diff --git a/systemd/netcfg.service b/systemd/netcfg.service index a4e5ddc..e9dcfbc 100644 --- a/systemd/netcfg.service +++ b/systemd/netcfg.service @@ -6,7 +6,6 @@ Wants=network.target [Service] Type=oneshot RemainAfterExit=yes -EnvironmentFile=/etc/conf.d/netcfg ExecStart=/usr/bin/netcfg-daemon start ExecStop=/usr/bin/netcfg-daemon stop |