Skip to content

Commit

Permalink
Merge pull request #3457 from dmbaturin/T3355-legacy-installations
Browse files Browse the repository at this point in the history
op mode: T3355: remove the mention of legacy non-image installations
  • Loading branch information
sever-sever authored May 16, 2024
2 parents 158dd9a + d8223d5 commit 2a07aae
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions python/vyos/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,14 @@ def get_full_version_data(fname=version_file):
else:
version_data['system_type'] = f"{hypervisor} guest"

# Get boot type, it can be livecd, installed image, or, possible, a system installed
# via legacy "install system" mechanism
# Get boot type, it can be livecd or installed image
# 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
boot_via = "installed image"
if run(""" grep -e '^overlay.*/filesystem.squashfs' /proc/mounts >/dev/null""") == 0:
if run(""" grep -e '^overlay.*/filesystem.squashfs' /proc/mounts >/dev/null """) == 0:
boot_via = "livecd"
elif run(""" grep '^overlay /' /proc/mounts >/dev/null """) != 0:
boot_via = "legacy non-image installation"
else:
boot_via = "installed image"
version_data['boot_via'] = boot_via

# Get hardware details from DMI
Expand Down

0 comments on commit 2a07aae

Please sign in to comment.