Gentoo Archives: gentoo-user

From: "Bo Ørsted Andresen" <bo.andresen@××××.dk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How can I force net.ath0 to use a certain channel?
Date: Sat, 31 Mar 2007 19:46:56
Message-Id: 200703312140.26980.bo.andresen@zlin.dk
In Reply to: RE: [gentoo-user] How can I force net.ath0 to use a certain channel? by Daevid Vincent
1 On Friday 30 March 2007 23:38:34 Daevid Vincent wrote:
2 > Thanks Neil for the help, unfortunately it didn't seem to work for me...
3 >
4 > locutus conf.d # /etc/init.d/net.ath0 start
5 > * Starting ath0
6 > * Running preup function
7 > /etc/conf.d/net: line 10:         if: command not found
8 > /etc/conf.d/net: line 11:         then: command not found
9 > /etc/conf.d/net: line 12:                 return: command not found
10 > /etc/conf.d/net: line 13:         fi: command not found
11 > * preup ath0 failed
12 >
13 > [ !! ]
14 > locutus conf.d # cat /etc/conf.d/net
15 [SNIP]
16 > preup() {
17 >         if [ ${IFACE} == "ath0" ] && /etc/init.d/net.eth0 --quiet status
18 >         then
19 >                 return 1
20 >         fi
21 > }
22
23 emerge --info ? etc-update ? What if you put `type if` and `type [` in the
24 beginning of the preup function? Does `/etc/init.d/net.ath0 --debug start`
25 reveal anything? `equery check bash` ? ... :)
26
27 As a side note '[[ ${IFACE} == ath0 ]]' or '[ ath0 = "${IFACE}" ]' would both
28 be better syntactically.. In practice that shouldn't matter though as
29 runscript.sh does require bash and IFACE should never be empty... It also
30 isn't what those error messages are complaining about.
31
32 Also as a comment to Mick's suggestion. While IFACE is before preup() is
33 called I don't think it gets exported..
34
35 --
36 Bo Andresen