1 #!/bin/sh 2 3 # $NetBSD: dhcpcd,v 1.8 2020/04/02 12:58:49 roy Exp $ 4 5 # PROVIDE: dhcpcd 6 # REQUIRE: network mountcritlocal 7 # BEFORE: NETWORKING 8 # KEYWORD: chrootdir 9 10 $_rc_subr_loaded . /etc/rc.subr 11 12 name=dhcpcd 13 rcvar=$name 14 command=/sbin/$name 15 extra_commands="reload" 16 17 load_rc_config $name 18 19 # Work out what pidfile dhcpcd will use based on flags 20 if [ -n "$flags" ]; then 21 myflags=$flags 22 else 23 eval myflags=\$${name}_flags 24 fi 25 pidfile=$(eval $command -P $myflags 2>/dev/null) 26 : ${pidfile:=/var/run/$name.pid} 27 unset myflags 28 29 run_rc_command "$1" 30