diff options
author | John Estabrook <jestabro@vyos.io> | 2024-05-17 10:24:26 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-17 10:24:26 -0500 |
commit | 9f8be3255e76f3fa4189f488a50c3296d45c4ba6 (patch) | |
tree | 5313d31513971ae5d5ff2c6cb2257479cba404bc /python/vyos/version.py | |
parent | c015e36778aa8ee2b679b313dcd12a8b0739d101 (diff) | |
parent | a901ad58c2bfef4c52da31e67404f63c99085e58 (diff) | |
download | vyos-1x-9f8be3255e76f3fa4189f488a50c3296d45c4ba6.tar.gz vyos-1x-9f8be3255e76f3fa4189f488a50c3296d45c4ba6.zip |
Merge pull request #3477 from vyos/mergify/bp/sagitta/pr-3474
T6354: Get rid of the custom boot type check in version.py (backport #3474)
Diffstat (limited to 'python/vyos/version.py')
-rw-r--r-- | python/vyos/version.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/version.py b/python/vyos/version.py index 47a10e201..86e96d0ec 100644 --- a/python/vyos/version.py +++ b/python/vyos/version.py @@ -33,11 +33,11 @@ import os import requests import vyos.defaults +from vyos.system.image import is_live_boot from vyos.utils.file import read_file from vyos.utils.file import read_json from vyos.utils.process import popen -from vyos.utils.process import run from vyos.utils.process import DEVNULL version_file = os.path.join(vyos.defaults.directories['data'], 'version.json') @@ -85,7 +85,7 @@ def get_full_version_data(fname=version_file): # In installed images, the squashfs image file is named after its image version, # while on livecd it's just "filesystem.squashfs", that's how we tell a livecd boot # from an installed image - if run(""" grep -e '^overlay.*/filesystem.squashfs' /proc/mounts >/dev/null """) == 0: + if is_live_boot(): boot_via = "livecd" else: boot_via = "installed image" |