On Friday 30 March 2007 1:11 am, Neil Bothwick wrote: > On Thu, 29 Mar 2007 22:20:21 -0700, Daevid Vincent wrote: > > > Please tell me there is some way to tweak my /etc/conf.d/wireless (or > > anything for that matter), so that I can tell it, "hey, when connecting > > to 'MATRIX', always use 802.11b and/or a certain channel range > > (presumably in the 'b' range)". > > You can do this globally for the interface, with channel_ath0. You could > probably use the preassociate() function to do it on a per-essid basis. > See wireless.example. > > > Furthermore, it would REALLY be great if I could do something whereby, > > if I have net.eth0 (i.e. CAT5 cable) then don't start net.ath0, else > > try net.ath0. Right now I have net.ath0 disabled by default because I > > hate when it starts up when I'm plugged in at work, as my traffic seems > > to go over the "slower" ath0 rather than the faster eth0 port. ?! I > > have ifplugd installed, but I don't think it can manage this kind of > > (seemingly obvious and intelligent) decision. > > ifplugd's task is to signal when eth0's cable is connected or > disconnected, not make decisions about other interfaces for you. > > Use the pre-up function in /etc/conf.d/net. > > preup() { > if [ ${IFACE} == "ath0" ] && /etc/init.d/net.eth0 --quiet status > then > return 1 > fi > } > > This will prevent ath0 starting if eth0 is connected.
Thanks Neil for the help, unfortunately it didn't seem to work for me... locutus conf.d # /etc/init.d/net.ath0 start * Starting ath0 * Running preup function /etc/conf.d/net: line 10: if: command not found /etc/conf.d/net: line 11: then: command not found /etc/conf.d/net: line 12: return: command not found /etc/conf.d/net: line 13: fi: command not found * preup ath0 failed [ !! ] locutus conf.d # cat /etc/conf.d/net # This blank configuration will automatically use DHCP for any net.* # scripts in /etc/init.d. To create a more complete configuration, # please review /etc/conf.d/net.example and save your configuration # in /etc/conf.d/net (this file :]!). dhcpcd_eth0="-t 10" dhcpcd_ath0="-t 30" dhcpcd_wlan0="-t 20" preup() { if [ ${IFACE} == "ath0" ] && /etc/init.d/net.eth0 --quiet status then return 1 fi } -- gentoo-user@gentoo.org mailing list