Skip to content

Commit a901ad5

Browse files
HollyGurzamergify[bot]
authored andcommitted
T6354: Get rid of the custom boot type check in version.py
(cherry picked from commit 783edc9)
1 parent badc6a2 commit a901ad5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/vyos/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333

3434
import requests
3535
import vyos.defaults
36+
from vyos.system.image import is_live_boot
3637

3738
from vyos.utils.file import read_file
3839
from vyos.utils.file import read_json
3940
from vyos.utils.process import popen
40-
from vyos.utils.process import run
4141
from vyos.utils.process import DEVNULL
4242

4343
version_file = os.path.join(vyos.defaults.directories['data'], 'version.json')
@@ -85,7 +85,7 @@ def get_full_version_data(fname=version_file):
8585
# In installed images, the squashfs image file is named after its image version,
8686
# while on livecd it's just "filesystem.squashfs", that's how we tell a livecd boot
8787
# from an installed image
88-
if run(""" grep -e '^overlay.*/filesystem.squashfs' /proc/mounts >/dev/null """) == 0:
88+
if is_live_boot():
8989
boot_via = "livecd"
9090
else:
9191
boot_via = "installed image"

0 commit comments

Comments
 (0)