X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FCheckForNewDisks.py;h=45ddb69941d07c8d2037deae94d1d481931aa189;hb=781dc69b89c6f9260655cd7350edf3c80c85521e;hp=9bb9b44385742ce02ae74b8b1db699c1eec1f92c;hpb=27d9e3ef16bff9214074e88ce76eb686f53f3d81;p=bootmanager.git diff --git a/source/steps/CheckForNewDisks.py b/source/steps/CheckForNewDisks.py index 9bb9b44..45ddb69 100644 --- a/source/steps/CheckForNewDisks.py +++ b/source/steps/CheckForNewDisks.py @@ -86,14 +86,11 @@ def Run( vars, log ): "of the volume group.\n" % device ) # this is the lvm partition, if it exists on that device - lvm_partition= "%s1" % device - cciss_lvm_partition= "%sp1" % device - cmd = "pvdisplay %s | grep -q 'planetlab'" + lvm_partition= InstallPartitionDisks.get_partition_path_from_device( device, vars, log ) + cmd = "pvdisplay %s | grep -q 'planetlab'" % lvm_partition + already_added= utils.sysexec_noerr(cmd, log) - already_added= utils.sysexec_noerr(cmd % lvm_partition, log) - cciss_already_added= utils.sysexec_noerr(cmd % cciss_lvm_partition, log) - - if already_added or cciss_already_added: + if already_added: log.write( "It appears %s is part of the volume group, continuing.\n" % device ) continue