From e6079c42ea48a401b4ef61eb103b3a0fba15a820 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Thu, 28 Apr 2022 16:05:01 +0200 Subject: live: detect cache partitions in new refresh Detects OpenGnsys cache partition when building the partition setup of a live system. OpenGnsys labels a Linux/ext4 partition as "CACHE". --- src/utils/probe.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/utils') diff --git a/src/utils/probe.py b/src/utils/probe.py index d14146c..f1bdc27 100644 --- a/src/utils/probe.py +++ b/src/utils/probe.py @@ -62,6 +62,15 @@ def getwindowsversion(winreghives): return 'Microsoft Windows' +def cache_probe(): + """ + Runs 'blkid -L CACHE' and returns stripped stdout + """ + proc_blkid = subprocess.run(['blkid', '-L', 'CACHE'], + stdout=subprocess.PIPE) + stdout = proc_blkid.stdout.decode().strip() + return stdout + def os_probe(mountpoint): """ Probes mountpoint for typical OS dependant files. -- cgit v1.2.3-18-g5258