On Friday 30 March 2007 23:38:34 Daevid Vincent wrote:
> 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
[SNIP]
> preup() {
> if [ ${IFACE} == "ath0" ] && /etc/init.d/net.eth0 --quiet status
> then
> return 1
> fi
> }
emerge --info ? etc-update ? What if you put `type if` and `type [` in the
beginning of the preup function? Does `/etc/init.d/net.ath0 --debug start`
reveal anything? `equery check bash` ? ... :)
As a side note '[[ ${IFACE} == ath0 ]]' or '[ ath0 = "${IFACE}" ]' would both
be better syntactically.. In practice that shouldn't matter though as
runscript.sh does require bash and IFACE should never be empty... It also
isn't what those error messages are complaining about.
Also as a comment to Mick's suggestion. While IFACE is before preup() is
called I don't think it gets exported..
--
Bo Andresen
pgpocwZ7E42Ji.pgp
Description: PGP signature

