FIX: disk layout: partprobe should be called and checked only for target device (#896)
* disk layout: partprobe should be called and checked only for target device * disk layout: partprobe: removed unnecessary bash subprocess
This commit is contained in:
parent
26f9b681a4
commit
eb712a9ca5
|
|
@ -141,7 +141,7 @@ class Filesystem:
|
|||
return partition
|
||||
|
||||
def partprobe(self) -> bool:
|
||||
return SysCommand(f'bash -c "partprobe"').exit_code == 0
|
||||
return SysCommand(f'partprobe {self.blockdevice.device}').exit_code == 0
|
||||
|
||||
def raw_parted(self, string: str) -> SysCommand:
|
||||
if (cmd_handle := SysCommand(f'/usr/bin/parted -s {string}')).exit_code != 0:
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ class Partition:
|
|||
return bind_name
|
||||
|
||||
def partprobe(self) -> bool:
|
||||
if SysCommand(f'bash -c "partprobe"').exit_code == 0:
|
||||
if SysCommand(f'partprobe {self.block_device.device}').exit_code == 0:
|
||||
time.sleep(1)
|
||||
return True
|
||||
return False
|
||||
|
|
|
|||
Loading…
Reference in New Issue