From 58948705bcf5136401621a8855e9f0c15049e1dd Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 5 Nov 2020 19:27:40 -0500 Subject: autoconfig: Fix logic error When the system starts, the PID file will not exist because we haven't started dhcpcd. Also update /var/run -> /run while we're here. Closes: https://bugs.gentoo.org/198083 Closes: https://bugs.gentoo.org/439912 Signed-off-by: Matt Turner --- init.d/autoconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.d/autoconfig b/init.d/autoconfig index 15900c2..f475813 100644 --- a/init.d/autoconfig +++ b/init.d/autoconfig @@ -529,9 +529,9 @@ start() { if yesno "${DHCP}" then einfo "DHCP broadcasting for IP on all detected interfaces ..." - if [ -f /var/run/dhcpcd.pid ] + if [ ! -f /run/dhcpcd.pid ] then - kill $(cat /var/run/dhcpcd.pid) + kill $(cat /run/dhcpcd.pid) sleep 2 fi dhcpcd -n -h $(hostname) -- cgit v1.2.3-65-gdbad