init: Depend on network-online.target instead of network.target in systemd units
authorTobias Brunner <tobias@strongswan.org>
Wed, 18 Jan 2017 12:52:59 +0000 (13:52 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 25 Jan 2017 14:10:50 +0000 (15:10 +0100)
This makes sure the network is "up" before connections are
loaded/initiated.

Fixes #2205.

init/systemd-swanctl/strongswan-swanctl.service.in
init/systemd/strongswan.service.in

index 944101f..1b865af 100644 (file)
@@ -1,6 +1,6 @@
 [Unit]
 Description=strongSwan IPsec IKEv1/IKEv2 daemon using swanctl
-After=network.target
+After=network-online.target
 
 [Service]
 Type=notify
index 49c1cd0..0bb9d54 100644 (file)
@@ -1,6 +1,6 @@
 [Unit]
 Description=strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf
-After=syslog.target network.target
+After=syslog.target network-online.target
 
 [Service]
 ExecStart=@SBINDIR@/@IPSEC_SCRIPT@ start --nofork