Re: Notes on handling of defaults
Le mar 14 oct 2008 13:39:38 CEST, Daniel Baumann <daniel@debian.org> a
écrit :
> How are defaults beeing handled in live-helper?
> -----------------------------------------------
> ...
> The hierarchy of methods in order to manipulates values of variables is
> the following (earlier methods are overwritten by later ones):
>
> * environment varialbles, if existing (though this should never be
> done anyway)
>
> * contents of /etc/default/live-helper, if existing [0].
>
> * contents of $(pwd)/config/*, if existing.
>
> * command line arguments, if existing (also see [1]).
>
> * local configuration file (passed through -c|-conffile FILE, but also
> see [2]).
>
> * Set_defaults(); (works as explained above).
Hello,
After reading this interesting e-mail, I revised the way I customize
my live systems : I was setting environment variables LH_* when calling
lh_config and lh_build, so I tried to specify my modifications in a
file I put in config/ directory, then I call :
lh_config --conffile <my-conf-file>
and
lh_build.
I noticed that in that case, some parameters set in my conf-file
aren't used : for example LH_DEBUG, because the lh_config script writes
its config/common file with this variable *commented* :
# \$LH_DEBUG: enable debug
# (Default: ${LH_DEBUG})
#LH_DEBUG="${LH_DEBUG}"
So the my custom value is the default here, but not used as it's
commented...
1/ Is it the correct behaviour of lh_config for this variable ? I think
even if I use command line « --debug », it will also be ignored.
2/ I wonder if I use the best way to customize the Debian live : should
I call lh_config with a config file (or command line arguments) or
should I call 'lh_config' and then modify its config files in config/* ?
Thanks for your advice,
Fred.
Reply to: