diff options
author | John Estabrook <jestabro@vyos.io> | 2023-11-26 09:25:01 -0600 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-12-16 20:37:10 -0600 |
commit | e07b24075561842e35df4e11a00f17960c0f9fff (patch) | |
tree | 85c2408c387838be846039981bbdd2640131cac0 /python/vyos/system | |
parent | 623cc2935d3dfc1a0715f61cf3ec45fbb23d2787 (diff) | |
download | vyos-1x-e07b24075561842e35df4e11a00f17960c0f9fff.tar.gz vyos-1x-e07b24075561842e35df4e11a00f17960c0f9fff.zip |
image-tools: T4516: exit grub-update service if running in docker
(cherry picked from commit 0b97bde2cb04cf5e23350798f972abcee4bfe4ee)
Diffstat (limited to 'python/vyos/system')
-rw-r--r-- | python/vyos/system/image.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/vyos/system/image.py b/python/vyos/system/image.py index 6c4e3bba5..c03ce02d5 100644 --- a/python/vyos/system/image.py +++ b/python/vyos/system/image.py @@ -261,3 +261,8 @@ def is_live_boot() -> bool: if boot_type == 'live': return True return False + +def is_running_as_container() -> bool: + if Path('/.dockerenv').exists(): + return True + return False |