> hiya
> 
> > $kernelmodules is the right way to do this, but not in
> > FAIBASE.var. The variable is used in 20-hwdetect.source, which is
> > executed before FAIBASSE.var is sourced. You can just edit your
> > 20-hwdetect.source script and add modules there to $kernelmodules.
> 
> Is there a "correct" way to provide variables to scripts in class/ ?
> 
> Currently I'm manually sourcing a specific file into (almost) each class/
> script. In the following steps (partitioning, packages, configure) I use
> the <file>.var mechanism. I'm searching for something close to that for
> class/ itself. Maybe DEFAULT.var could be sourced even before class/ has
> run? The DEFAULT class is announced automatically later on anyway.
> 
> (What for? Inside class/ I'm writing some configuration stuff into a
> special config file. The class scripts all manually source DEFAULT.var in
> order to find out where the variable IDENTITYFILE points to. The other
> scripts (most importantly config/*) later on just "source $IDENTITYFILE"
> wherever that variable may point to.)
> 

If you name your script 00foobar.source it will be executed first _and_ sourced,
therefore all variable definitions from 00foobar.source will also be visible in
all other scripts. You might need to export the variable to have it available in
the entire FAI run, but that I'm not sure of.

Is that what you're looking for?

Best,
Michael

Attachment: pgp0QaFAbjI2z.pgp
Description: PGP signature

Antwort per Email an