mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
b81d36b196
- Bump PORTREVISION Reported by: sat
37 lines
613 B
Bash
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"
|