diff options
Diffstat (limited to 'net/dhcpcd')
-rwxr-xr-x | net/dhcpcd/files/dhcpcd.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/net/dhcpcd/files/dhcpcd.sh b/net/dhcpcd/files/dhcpcd.sh index 1b25d8580b8..11471976e12 100755 --- a/net/dhcpcd/files/dhcpcd.sh +++ b/net/dhcpcd/files/dhcpcd.sh @@ -9,7 +9,17 @@ $_rc_subr_loaded . /etc/rc.subr name="dhcpcd" rcvar=$name command="@PREFIX@/sbin/${name}" -pidfile="@VARBASE@/run/${name}.pid" load_rc_config $name + +# Work out what pidfile dhcpcd will use based on flags +if [ -n "$flags" ]; then + myflags=$flags +else + eval myflags=\$${name}_flags +fi +pidfile=$(eval $command -P $myflags 2>/dev/null) +: ${pidfile:=/var/run/$name.pid} +unset myflags + run_rc_command "$1" |