using varaibles in setup-storage

Michael Tautschnig mt at debian.org
Mon Feb 9 22:17:12 CET 2009


> Jean Spirat a écrit :
>> hi,
>>
>> I just wanted to know if we can use variables in setup-storage config  
>> files ? I wanted to use the hostname to name my vg group  and i  
>> wondered if this was possible.
>>
>> regards,
>> Jean
> it seems this do not work at least with $HOTNAME for exemple, perhaps  
> any other way (env variables or other ?)  ?
>

No, at the moment this is definitely not possible. One option may be to extend
the parser to permit such stuff. It is doable, but I don't really like it.
First, variable expansion is always a bit dangerous (it may or may not expand
the way you expect it to get expanded), and when to expand and when not to
expand is a fairly tricky part while writing the parser.

I'd really suggest you generate your configs on the fly: create a hook
partition.DEFAULT that creates /var/lib/fai/config/disk_config/your_host,
probably from some template. That way it is up to you to check for sane variable
expansion and you can do whatever trickery you like.

Best,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090209/d09b846a/attachment.bin 


More information about the linux-fai mailing list