#!/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..." ip_up_events='yes' 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 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_servers' fi ;; esac case $route in imond | none) no_def_gw=-G ;; esac # metric= # [ "$DHCP_CLIENT_DEV" ] && metric="-m 0" /sbin/dhcpcd $debug -c /etc/dhcpcd.sh $metric $hostname $no_def_gw $get_dns_name $interface done end_script ;; esac