question about disk_var.sh
Thomas Neumann
blacky+fai at fluffbunny.de
Thu Aug 7 18:05:27 CEST 2014
Hello
On Thursday 07 August 2014 18:25:31 Toomas Tamm wrote:
> Here is the relevant dialogue between me (Toomas Tamm) and Michael
> Tautschnig (the original author of setup-storage):
Ah. Now I understand. Thanks for the archeological dig. =)
> Now, looking at my current configuration space, I see that I am not
> using this feature anyway. My own SVN logs indicate that I created an
> alternative solution approximately at the same time as this dialogue
> took place. So, from my point of view, the patch could be reverted.
> On the other hand, if properly documented, it would allow for neat
> overrides of the boot and root device assignments, which could be done
> in the class/* scripts.
I think we should keep this feature. It would allow to define a class and use
the <class>.var mechanism to override the automatically generated values.
This looks like a very fai-ish way to accomplish any required changes to these
variables.
I have prepared a patchset for Thomas & Kerim which moves the actual file-
content generator logic for disk_var.sh from setup-storage to Fstab.pm (to
get rid of generating the output for debug and the actual file content
separately) which also contains:
# 'VAR=${VALUE1:-$VALUE2}': if the $VALUE1 is unset or empty use
# $VALUE2, otherwise use $VALUE1
push @disk_vars, "$varname=\${$varname:-$value}";
At least for the source it should be obvious what is going on and confirm
the 'strange syntax' is actually valid and intended. We ~might~ want to
add an explanatory line to the actual disk_vars.sh, but I leave that to
Thomas / Kerim.
bye
thomas
More information about the linux-fai
mailing list