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: should use a pidfile
23 if [ -x /usr/bin/pgrep ]; then
24 pids=`/usr/bin/pgrep -f "dhclient: $ifn(\$| .*)"`
25 if [ -n "$pids" ]; then
30 # Override for $ifn specific flags (see rc.subr for $flags setting)
31 eval specific=\$dhclient_flags_$ifn
32 if [ -z "$flags" -a -n "$specific" ]; then
36 eval specific=\$background_dhclient_$ifn
37 if [ -n "$specific" ]; then
38 if checkyesno background_dhclient_$ifn; then
39 rc_flags="${rc_flags} -b"
41 elif checkyesno background_dhclient; then
42 rc_flags="${rc_flags} -b"
45 ${dhclient_program} ${rc_flags} $ifn
50 ifconfig $ifn down # cause dhclient to die
57 if ! dhcpif $ifn; then