1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-18 03:26:14 +02:00

Fix dhcpcd service

First of all, fix the dependency name in the per-interface service file.

Second, we allow the master services daemonize itself and change the target
to wait. This way, we block init until we are sure the dhcpcd master
is running. Otherwise we have a race condition if init gets scheduled
for some reason and immediately starts the dhcpcd interface daemon that
cannot see the master and decides that *it* is the msater now.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-05-07 14:57:34 +02:00
parent a18968fca1
commit acd2a1f57f
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
description "DHCP client on %0"
type once
target boot
after dhcpcd
after dhcpcdmaster
exec dhcpcd -n %0

View file

@ -1,9 +1,9 @@
description "DHCP client - master service"
type respawn limit 5
type wait
target boot
after sysinit ifrename ifcfg
exec {
mkdir -p /var/db/dhcpcd
dhcpcd -B --inactive
dhcpcd --inactive
}