setup-storage: set vgname to hostname

Darshaka Pathirana dpat at syn-net.org
Sun Oct 18 15:45:47 CEST 2009


On 10/15/2009 10:10 PM, Michael Tautschnig wrote:
> Darshaka Pathirana wrote:
>> Hmm. I don't think I understand what you mean. I mean I HAVE tried
>> using $HOSTNAME in my disk_config-layout with setup-storage and it did
>> NOT work (at least for me - see my first post in this thread).
>>
>> Maybe I've done a mistake?
>>
> 
> 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.

Nice. I will try that on my next deployment and report back.

Thank you.

Greetz,
 - Darsha


More information about the linux-fai mailing list