setup-storage: set vgname to hostname

Thomas Neumann blacky+fai at fluffbunny.de
Tue Sep 29 20:27:44 CEST 2009


hiya

> Thomas Neumann a écrit :
>>> You can write a hook that replaces $HOSTNAME with the current
>>> hostname. This is the easiest way.

>> As a bonus: It even works!

> do you know wich variable we could use in a way that is supported by FAI
> . I mean using a variable like $HOSTNAME or whatever would be great but
> only if this is a normal behavior and not an edge condition as if i
> upgrade FAI i do not want to have all my partition system stop working.
> Could you tell us your advice and variable list we could or should not use
> ?

I prefer using my own variables in my own namespace and initialize them
from a "known good" source - like $HOSTNAME. This may not be the most
obvious solution, but this way you can guarantee that "your" variable has
a valid value. And if $HOSTNAME turns out to be unrealiable - or undesired
- then you could easily change the source (like maybe retrieving the value
from an external database.) without having to wade through the rest of the
source code trying hard not to introduce new bugs.

tschüß
thomas




More information about the linux-fai mailing list