Index of /~khorben/projects/netbsd/usr/sbinName Size Description
Parent Directory -
ifcarrier 1k
ifcarrier is a script meant to automatically detect and apply the relevant network settings on a NetBSD system, each time a wired connection cuts in and out.
The technique used consists of querying the MAC address of potentially known machines on the network, and comparing them with the expected result from a local database.
This is done here on NetBSD, with the help of the ifwatchd daemon.
To install ifcarrier onto your system, please follow these steps:
gw_mac_address gw_ip your_ip network_namewhere gw_ip is the IP of any other machine always found on the given network, gw_mac_address is its MAC address, and your_ip is your usual IP on the network
up
ifwatchd=YES ifwatchd_flags="-c /usr/local/sbin/ifcarrier if0"
/etc/rc.d/ifwatchd start
As always, consult your logs and particularly /var/log/messages, which should tell you this when you plug in your cable:
/usr/sbin/ifwatchd: watching interface if0 /usr/sbin/ifwatchd: calling: /usr/local/sbin/ifcarrier if0 /dev/null 9600
You can also track the state of your interface with the ifconfig if0 command.
set uname=root gname=wheel ./etc type=dir mode=0755 ./etc/hosts type=link mode=0755 ./etc/resolv.conf type=link mode=0755