also use more explicit --list option instead of -l
# just to be extra paranoid, ignore the device if it already has
# an lvm partition on it (new disks won't have this, and that is
# what this code is for, so it should be ok).
- cmd = "parted -l %s | grep -q lvm$" % device
+ cmd = "parted --script --list %s | grep -q lvm$" % device
has_lvm= utils.sysexec_noerr(cmd, log)
if has_lvm:
log.write( "It appears %s has lvm already setup on it.\n" % device)
devicenames = valid_blk_names.keys()
devicenames.sort()
for devicename in devicenames:
- os.system( "parted -l /dev/%s > /dev/null 2>&1" % devicename )
+ os.system( "parted --script --list /dev/%s > /dev/null 2>&1" % devicename )
# touch file
fb = open(DEVICES_SCANNED_FLAG,"w")