Executing parted with sudo in _write_partition
This commit is contained in:
parent
abe147f756
commit
72c5735e1f
@ -991,8 +991,8 @@ def _write_partition(virtual_size, dev):
|
||||
def execute(*cmd, **kwargs):
|
||||
return utils.execute(*cmd, **kwargs)
|
||||
|
||||
execute('parted', '--script', dest, 'mklabel', 'msdos')
|
||||
execute('parted', '--script', dest, 'mkpart', 'primary',
|
||||
execute('sudo', 'parted', '--script', dest, 'mklabel', 'msdos')
|
||||
execute('sudo', 'parted', '--script', dest, 'mkpart', 'primary',
|
||||
'%ds' % primary_first,
|
||||
'%ds' % primary_last)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user