7 # KEYWORD: nojail nostart
14 start_cmd="dhclient_start"
15 stop_cmd="dhclient_stop"
19 # prevent unnecessary restarts
20 # XXX: dhclient had better create a pidfile
21 if [ -x /bin/pgrep ]; then
22 pids=`/bin/pgrep -f "dhclient: $ifn(\$| .*)"`
23 if [ -n "$pids" ]; then
28 # Override for $ifn specific flags (see rc.subr for $flags setting)
29 specific=`get_if_var $ifn dhclient_flags_IF`
30 if [ -z "$flags" -a -n "$specific" ]; then
34 background_dhclient=`get_if_var $ifn background_dhclient_IF $background_dhclient`
35 if checkyesno background_dhclient; then
36 rc_flags="${rc_flags} -b"
39 ${dhclient_program} ${rc_flags} $ifn
44 ifconfig $ifn down # cause dhclient to die
50 load_rc_config network
52 if ! dhcpif $ifn; then