diff options
author | roy <roy@pkgsrc.org> | 2016-01-20 19:28:57 +0000 |
---|---|---|
committer | roy <roy@pkgsrc.org> | 2016-01-20 19:28:57 +0000 |
commit | 7944c5bffbce7585262254bce0f3af9ea7e7bb4b (patch) | |
tree | a9d39f7e6f03897f3e6a479ddddc3beaf48cd80f /net/dhcpcd | |
parent | 64855ede6dc59c28dc8ae3ceb7a6450baf8ca5c7 (diff) | |
download | pkgsrc-7944c5bffbce7585262254bce0f3af9ea7e7bb4b.tar.gz |
Adjust rc script to use correct pidfile.
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" |