3 # $NetBSD: dhclient,v 1.8 2002/03/22 04:33:58 thorpej Exp $
4 # $FreeBSD: src/etc/rc.d/dhclient,v 1.20.2.4 2007/03/10 14:07:01 yar Exp $
5 # $DragonFly: src/etc/rc.d/dhclient,v 1.10 2007/07/10 22:36:01 swildner Exp $
9 # KEYWORD: nojail nostart
17 start_cmd
="dhclient_start"
18 stop_cmd
="dhclient_stop"
22 # prevent unnecessary restarts
23 # XXX: dhclient had better create a pidfile
24 if [ -x /bin
/pgrep
]; then
25 pids
=`/bin/pgrep -f "dhclient: $ifn(\$| .*)"`
26 if [ -n "$pids" ]; then
31 # Override for $ifn specific flags (see rc.subr for $flags setting)
32 eval specific
=\
$dhclient_flags_$ifn
33 if [ -z "$flags" -a -n "$specific" ]; then
37 # eval specific=\$background_dhclient_$ifn
38 # if [ -n "$specific" ]; then
39 # if checkyesno background_dhclient_$ifn; then
40 # rc_flags="${rc_flags} -b"
42 # elif checkyesno background_dhclient; then
43 # rc_flags="${rc_flags} -b"
46 ${dhclient_program} ${rc_flags} $ifn
51 ifconfig
$ifn down
# cause dhclient to die
57 load_rc_config network
59 if ! dhcpif
$ifn; then