summaryrefslogtreecommitdiffstats
path: root/src/utils/probe.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2022-04-28 16:05:01 +0200
committerJose M. Guisado <jguisado@soleta.eu>2022-04-28 16:11:11 +0200
commite6079c42ea48a401b4ef61eb103b3a0fba15a820 (patch)
treecd5aeb96297bcc2981de79cec1c7a38c92481175 /src/utils/probe.py
parent3da8100a3b3dd2e826e815d7a03dc63cd223e378 (diff)
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".
Diffstat (limited to 'src/utils/probe.py')
-rw-r--r--src/utils/probe.py9
1 files changed, 9 insertions, 0 deletions
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.