begin_script CIRCUITS "preparing dhcp circuit ..." # dev name phone bandwidth route times chargeint type name=dhcp phone='-' bandwidth='-1:-1' route='0.0.0.0/0' times='Mo-Su:00-24:0.0:Y' hup_timeout=0 chargeint=0 type=dhcp [ 0$DHCP_CLIENT_N -eq 0 ] || for i in `seq 1 $DHCP_CLIENT_N`; do eval interface=\$DHCP_CLIENT_${i}_IF eval dhcp_route=\$DHCP_CLIENT_${i}_ROUTE eval dev=\$$interface if [ ! "$dev" ]; then log_error "Invalid interface reference '$interface' DHCP_CLIENT_${i}_IF" continue fi [ "$dhcp_route" = none ] && continue [ "$dhcp_route" = imond ] && add_imond_entry echo "$dev dhcp" > /var/run/circuit-name.$dev if [ -f /var/run/circuit-dhcp ]; then log_error "Currently only one dhcp circuit is supported" else echo "$dev" > /var/run/circuit-dhcp fi done end_script