Re: fonctionnement de /etc/network/if-pre-up.d/madwifi
Le lun 19 mar 2007 11:18:21 CET, fred <fredantispam@free.fr> a écrit :
> > Cherche le point et tu trouveras :)
> Si cela avait aussi simple, je n'aurais pas posté ;-)
> .....
> if [ ! -n "$IF_MADWIFI_BASE" ]; then
> exit 0
> fi
>
> De plus, si un fichier de conf était sourcé pour initialiser ces
> variables, le mot clé IF_MADWIFI_BASE devrait apparaître dans un fichier
> de /etc (j'entends et ses sous-répertoires). Or il n'y a rien de tel.
>
> Les fichiers de /etc/network/if-* doivent bien être lancés par un script,
> mais idem, je n'ai pas trouvé lequel, en cherchant comme mot-clé
> if-pre-up dans /etc (et ses sous-répertoires aussi).
>
> Il me manque donc quelquechose dans la compréhension du fonctionnement
> des fichiers de /etc/network/if-*
Allez, un dernier coup de pouce, la solution n'est pas loin, dans la
page de manuel de /etc/network/interfaces (mais encore faut-il y
penser) :
...
There exists for each of the above mentioned options a directory
/etc/network/if-<option>.d/ the scripts in which are run (with no argu-
ments) using run-parts(8) after the option itself has been processed.
All of these commands have access to the following environment vari-
ables.
IFACE physical name of the interface being processed
...
Additionally, all options given in an interface definition stanza are
exported to the environment in upper case with "IF_" prepended and with
hyphens converted to underscores and non-alphanumeric characters dis-
carded.
Donc je pense que tu dois pouvoir ajouter qq chose comme :
iface ath0 inet static
address ...
...
madwifi_base wifi0
madwifi_mode ap
Fred.
Reply to: