Subject: None
To: None <netbsd-users@netbsd.org>
From: koen.victor@pandora.be <koen.victor@pandora.be>
List: netbsd-users
Date: 08/12/2003 23:33:40
Hi,
If my laptop isn't physically connected to the network, dhclient still requests an ip from the dhcp server.
I could set the timeout to some low value, but that 's not a 'perfect' solution.
What I'd like is that dhclient is only started when the network cable is connected to the laptop.
I tried it in /etc/rc.conf with
VAR=$(ifconfig vr0 | grep 'status: active')
ARG="status: active"
ARG=$(echo -e "\t$ARG")
dhclient=NO
dhclient_flags="vr0"
if [ "$VAR" = "$ARG" ]
then
dhclient=YES
dhclient_flags="vr0"
fi
but dhclient doesn't appear to get set.
How can this be done?
Many thanks,
Koen Victor