#!/bin/sh #---------------------------------------------------------------------------- # /etc/rc.d/rc310.dhcpcd - startup of DHCPCD # # Creation: 04.05.2002 od # Last Update: $Id$ #---------------------------------------------------------------------------- case x$DHCP_CLIENT_TYPE in xdhcpcd) begin_script DHCP_CLIENT "starting dhcp client daemon..." mkdir -p /var/db debug="" if [ "$DHCP_CLIENT_DEBUG" = yes ] then > /var/run/dhcp-debug debug=-d fi [ 0$DHCP_CLIENT_N -eq 0 ] || for i in `seq 1 $DHCP_CLIENT_N`; do eval interface=\$DHCP_CLIENT_${i}_IF eval route=\$DHCP_CLIENT_${i}_ROUTE eval usepeerdns=\$DHCP_CLIENT_${i}_USEPEERDNS eval hostname=\$DHCP_CLIENT_${i}_HOSTNAME eval delay=\$DHCP_CLIENT_${i}_STARTDELAY eval wait=\$DHCP_CLIENT_${i}_WAIT no_def_gw= : ${route:=none} eval interface=\$$interface if [ ! "$interface" ]; then log_error "invalid interface reference $i" continue fi [ "$hostname" ] && hostname="-h $hostname" > /var/run/dhcp-client.$interface.$route case $route in imond | default) ip_up_events='yes' > /var/run/dhcp-client.$interface.ip-updown if [ "$usepeerdns" = yes ]; then echo yes > /var/run/$interface.usepeerdns get_dns_name='-o domain_name,domain_name_servers' fi ;; esac case $route in imond | none) no_def_gw=-G ;; esac if [ "x$delay" != "x" ] then log_info "delayed start of dhcpcd - delay: $delay [sec]" sleep $delay fi if [ "$wait" = yes ] then wait_opt="-w" else wait_opt="-b" fi dhcpcd $debug -c /etc/dhcpcd.sh $wait_opt -L $hostname $no_def_gw $get_dns_name $interface done end_script ;; esac