3 # $NetBSD: dhclient,v 1.8 2002/03/22 04:33:58 thorpej Exp $
8 # KEYWORD: nojail nostart
16 start_cmd="dhclient_start"
17 stop_cmd="dhclient_stop"
21 # prevent unnecessary restarts
22 # XXX: dhclient had better create a pidfile
23 if [ -x /bin/pgrep ]; then
24 pids=`/bin/pgrep -f "dhclient: $ifn(\$| .*)"`
25 if [ -n "$pids" ]; then
30 # Override for $ifn specific flags (see rc.subr for $flags setting)
31 specific=`get_if_var $ifn dhclient_flags_IF`
32 if [ -z "$flags" -a -n "$specific" ]; then
36 background_dhclient=`get_if_var $ifn background_dhclient_IF $background_dhclient`
37 if checkyesno background_dhclient_$ifn; then
38 rc_flags="${rc_flags} -b"
41 ${dhclient_program} ${rc_flags} $ifn
46 ifconfig $ifn down # cause dhclient to die
52 load_rc_config network
54 if ! dhcpif $ifn; then