|
|
|
@ -436,9 +436,29 @@ class partition(cryptobox.plugins.base.CryptoBoxPlugin):
|
|
|
|
|
# very ugly - maybe a uml bug? |
|
|
|
|
# it seems, like this can be avoided by running uml with the param "aio=2.4" |
|
|
|
|
(output, error) = proc.communicate() |
|
|
|
|
if proc.returncode != 0: |
|
|
|
|
fdisk_status = proc.returncode |
|
|
|
|
if fdisk_status != 0: |
|
|
|
|
self.cbox.log.debug("partitioning failed: %s" % error) |
|
|
|
|
return proc.returncode == 0 |
|
|
|
|
##Every time we update a partition table, force the kernel |
|
|
|
|
##to reread it and update /proc/partitions. This particularly |
|
|
|
|
##applies to internal hard disks. |
|
|
|
|
rereadpt_proc = subprocess.Popen( |
|
|
|
|
shell = False, |
|
|
|
|
stdin = subprocess.PIPE, |
|
|
|
|
stdout = subprocess.PIPE, |
|
|
|
|
stderr = subprocess.PIPE, |
|
|
|
|
args = [ |
|
|
|
|
self.cbox.prefs["Programs"]["super"], |
|
|
|
|
self.cbox.prefs["Programs"]["CryptoBoxRootActions"], |
|
|
|
|
"plugin", |
|
|
|
|
os.path.join(self.plugin_dir, "root_action.py"), |
|
|
|
|
"rereadpt", |
|
|
|
|
self.blockdevice.devnodes[0]]) |
|
|
|
|
(output, error) = rereadpt_proc.communicate() |
|
|
|
|
rereadpt_status = rereadpt_proc.returncode |
|
|
|
|
if rereadpt_status != 0: |
|
|
|
|
self.cbox.log.info("failed to reread the modified partition table: %s" % error) |
|
|
|
|
return (fdisk_status == 0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def __get_sfdisk_layout(self, param_parts, is_filled): |
|
|
|
|