1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/net/dhcpcd/files/dhcpcd.in
Lars Engels b81d36b196 - Use %%PREFIX%% in rc script
- Bump PORTREVISION

Reported by:	sat
2008-01-01 16:13:00 +00:00

37 lines
613 B
Bash

#!/bin/sh
# PROVIDE: dhclient
# KEYWORD: nojail nostart
#
. %%RC_SUBR%%
. /etc/network.subr
name="dhcpcd"
ifn="$2"
command="%%PREFIX%%/sbin/dhcpcd"
command_args="$ifn"
pidfile="/var/run/dhcpcd-$ifn.pid"
start_precmd="dhcpcd_precmd"
dhcpcd_precmd()
{
# Override for $ifn specific flags (see rc.subr for $flags setting)
specific=`get_if_var $ifn dhcpcd_flags_IF`
if [ -z "$flags" -a -n "$specific" ]; then
rc_flags=$specific
fi
# dhcpcd may need local binaries
export PATH=${PATH}:%%PREFIX%%/sbin
}
load_rc_config $name
load_rc_config network
if ! dhcpif $ifn; then
return 1
fi
run_rc_command "$1"