net-misc/dhcpcd: make dhcpcd.service block until a lease is obtained
authorMike Gilbert <floppym@gentoo.org>
Tue, 10 May 2016 01:46:49 +0000 (21:46 -0400)
committerWilliam Hubbs <williamh@gentoo.org>
Thu, 12 May 2016 15:48:43 +0000 (10:48 -0500)
This makes the systemd unit behave more like the init script, and should
resolve issues with NFS mounts.

Bug: https://bugs.gentoo.org/582484

net-misc/dhcpcd/files/dhcpcd.service

index 2ac9adca0692600654dd4be98532a514ce6ef083..8430214d59b454381cc98862d5f19c3f52029877 100644 (file)
@@ -1,10 +1,12 @@
 [Unit]
 Description=Lightweight DHCP client daemon
 Wants=network.target
-Before=network.target
+Before=network.target network-online.target
 
 [Service]
-ExecStart=/sbin/dhcpcd -q --nobackground
+Type=forking
+ExecStart=/sbin/dhcpcd -q
+PIDFile=/run/dhcpcd.pid
 
 [Install]
 WantedBy=multi-user.target