> 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
pgpfSbbEB8L14.pgp
Description: PGP signature
