From 5c4b1cb052f72fbcaa1dcae250e7a02d613885c1 Mon Sep 17 00:00:00 2001 From: Syboxez Blank <@Syboxez:matrix.org> Date: Tue, 23 Apr 2024 14:27:11 -0500 Subject: [PATCH] chroot/base: Create chroot indicator file for use with boot-deploy --- chroot/base.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/chroot/base.py b/chroot/base.py index 93b07e7..6a50f7b 100644 --- a/chroot/base.py +++ b/chroot/base.py @@ -48,6 +48,19 @@ class BaseChroot(Chroot): ) if result.returncode != 0: raise Exception(f'Failed to initialize chroot "{self.name}"') + + # This indicator is used to prevent boot-deploy from flashing aboot.img after creation + logging.info('Creating chroot indicator file') + + result = run_root_cmd( + [ + 'touch', + f'{self.path}/in-kupferbootstrap', + ], + stderr=sys.stdout, + ) + if result.returncode != 0: + raise Exception('Failed to create chroot indicator file') self.initialized = True