diff options
-rw-r--r-- | src/live/ogOperations.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index a72a842..86470aa 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -346,7 +346,6 @@ class OgLiveOperations: cxt.add_partition(pa) cxt.write_disklabel() - subprocess.run(['partprobe', f'/dev/{diskname}']) for part in partlist: if part["filesystem"] == 'EMPTY': @@ -358,10 +357,20 @@ class OgLiveOperations: partition = int(part["partition"]) if fs == 'cache': mkfs('ext4', int(disk), partition, label='CACHE') - init_cache() else: mkfs(fs, int(disk), partition) + ret = subprocess.run(['partprobe', f'/dev/{diskname}']) + logging.info(f'partprobe /dev/{diskname} reports {ret.returncode}') + + for part in partlist: + if part["filesystem"] == 'EMPTY': + continue + + fs = part["filesystem"].lower() + if fs == 'cache': + init_cache() + logging.info('Partition setup command OK') result = self.refresh(ogRest) |