Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T6354: Get rid of the custom boot type check in version.py #3474

Merged
merged 1 commit into from
May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/vyos/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@

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')
Expand Down Expand Up @@ -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"
Expand Down
Loading