summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-09-01 09:39:03 +0200
committerChristian Breunig <christian@breunig.cc>2026-09-01 17:27:07 +0200
commite94f0e47d742f3c8f228bf21907954008ade7ba0 (patch)
tree39f38d1f51e0d5325a39ea9ea81cd65ba5554a7e /scripts
parent6d2523edeed89e0d968df13b7ec656de5bbd2952 (diff)
downloadvyos-1x-e94f0e47d742f3c8f228bf21907954008ade7ba0.tar.gz
vyos-1x-e94f0e47d742f3c8f228bf21907954008ade7ba0.zip
image: T9269: skip GRUB updates on container and diskless systems
Kernel cmdline and serial console updates rewrite the GRUB configuration on the persistence partition. A container has no GRUB at all, and on a system where the persistence partition is not mounted disk.find_persistence() returns an empty string, so the code reads '//boot/grub/grub.cfg' and dies with FileNotFoundError. Extend is_running_as_container() to also honor /run/.containerenv (Podman) and the container= variable systemd sets for PID 1, and add if_not_container() plus if_persistence() decorators guarding all grub_util entry points.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions