dhcpcd revision 1.2
11.1Sroy#!/bin/sh 21.1Sroy 31.1Sroy# PROVIDE: dhcpcd 41.1Sroy# REQUIRE: network mountcritlocal 51.1Sroy# BEFORE: NETWORKING 61.1Sroy 71.1Sroy$_rc_subr_loaded . /etc/rc.subr 81.1Sroy 91.1Sroyname=dhcpcd 101.1Sroyrcvar=$name 111.1Sroycommand=/sbin/$name 121.1Sroy 131.1Sroyload_rc_config $name 141.2Sroy 151.2Sroy# If the last argument to dhcpcd is a valid interface and the prior argument 161.2Sroy# is not then dhcpcd will start on one interface only and create a pidfile 171.2Sroy# based on the interface name. See PR bin/43490. 181.2Sroyif [ -n "$flags" ]; then 191.2Sroy myflags=$flags 201.2Sroyelse 211.2Sroy eval myflags=\$${name}_flags 221.2Sroyfi 231.2Sroyifname="${myflags##* }" 241.2Sroymyflags="${myflags%% $ifname}" 251.2Sroylast_flag="${myflags##* }" 261.2Sroyif /sbin/ifconfig "$ifname" >/dev/null 2>&1 && 271.2Sroy ! /sbin/ifconfig "$last_flag" >/dev/null 2>&1 281.2Sroythen 291.2Sroy pidfile=/var/run/$name-"$ifname".pid 301.2Sroyelse 311.2Sroy pidfile=/var/run/$name.pid 321.2Sroyfi 331.2Sroyunset myflags ifname last_flag 341.2Sroy 351.1Sroyrun_rc_command "$1" 36