diff options
-rwxr-xr-x | bin/fde_tests.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bin/fde_tests.py b/bin/fde_tests.py index 276f283..cc75a69 100755 --- a/bin/fde_tests.py +++ b/bin/fde_tests.py @@ -20,25 +20,27 @@ import re import subprocess as sp import sys +from checkbox_support.snap_utils.system import get_series + def main(): on_desktop = len(sys.argv) > 1 and sys.argv[1] == 'desktop' - # the mountpoint corresponding to the on disk encrypted partition - base_mount = '/' if on_desktop else '/writable' - # discover the underlying mount point for the encrypted part if on_desktop: - cmd = 'findmnt {} -n -o SOURCE'.format(base_mount) + cmd = 'findmnt {} -n -o SOURCE'.format('/') else: - cmd = 'findfs LABEL=writable' + if int(get_series()) >= 20: + cmd = 'findfs LABEL=ubuntu-data' + else: + cmd = 'findfs LABEL=writable' print('+ {}'.format(cmd)) try: source = sp.check_output(cmd, shell=True).decode( sys.stdout.encoding).strip() except sp.CalledProcessError: raise SystemExit( - 'ERROR: could not find mountpoint for {}'.format(base_mount)) + 'ERROR: could not find mountpoint for the encrypted partition') print(source, '\n') # resolve the source to an actual device node |