Hi,

On 01/13/2012 10:05 AM, Russ Lavoy wrote:

> We have VMs and physical hosts.  How would I use a single profile and do 
> certain things if it is sda or xvda vhda etc?


I use a bash script in the pre section:

----------

#!/bin/bash

disks=(\$(awk '{if ($NF ~ "^[hsv]d[a-z]\$" ) print "/dev/"\$NF}'
/proc/partitions | sort))

let numhd="\${#disks[*]}"

----------


The disks are then stored in the array 'disks', you can then do whatever
you need with it - in my kickstart I do different partition layouts
depending on the number and sizes of disks, etc.


Hope that helps!


Best,
Dan
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to