setup-storage: set vgname to hostname
Thomas Neumann
blacky+fai at fluffbunny.de
Mon Oct 19 22:20:11 CEST 2009
>> On 09/30/2009 12:11 AM, Jean Spirat wrote:
> I think you don't use a proper hook. Let me try to elaborate:
>
> - Create a disk config disk_config/SOMETHING that has ##HOSTNAME## in the
> places
> you'd like to see $HOSTNAME to be replaced.
> - Add a hook hooks/partition.DEFAULT that does the following:
>
> cp $FAI/disk_config/SOMETHING $FAI/disk_config/$HOSTNAME
> sed -i "s/##HOSTNAME##/$HOSTNAME/" $FAI/disk_config/$HOSTNAME
>
> That should be about it, I think. I haven't actually tested this, so
> others might want to correct me.
This will break if $FAI is not writeable. (Usually it is.)
This procedure may be somewhat safer if you use -f to feed setup-storage
its new config file.
(My hook replaces different values, but this shouldn't matter much. The
file uses $FAI/disk_config/DISKlvm as its template, which is also attached
to this mail.) [Please ignore the call to /tmp/fai/IDENTITY.]
tschüß
thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: partition.DISKlvm
Type: application/octet-stream
Size: 3015 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20091019/1d33e826/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DISKlvm
Type: application/octet-stream
Size: 1626 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20091019/1d33e826/attachment-0001.obj
More information about the linux-fai
mailing list