Quote:
Originally Posted by jggimi
If dhclient(8) is able to sense the NIC status is down, ifstated(8) should be able to obtain the same state information, and this should not require external scripting. Should.
|
Ooo, nice catch!
/etc/ifstated.conf now reads:
Code:
init-state auto
wpi0_down = "wpi0.link.down"
state auto {
if ! $wpi0_down {
set-state if_online
}
if $wpi0_down {
set-state if_offline
}
}
state if_online {
if $wpi0_down {
set-state if_offline
}
}
state if_offline {
init {
run "sh /etc/netstart wpi0"
}
if ! $wpi0_down {
set-state if_online
}
}
I'll live with it for a while and see how it works out