summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2026-04-02 12:29:08 -0500
committerJohn Estabrook <jestabro@vyos.io>2026-04-15 15:17:27 -0500
commit61a7a19562088250c87cf11b798c84dc470a6c7d (patch)
tree72944af5f343d1a94b9050a5adaf21dddcbdade8 /src
parentb6cd3de873113fbbf094ce304560a51a7677d349 (diff)
downloadvyos-1x-61a7a19562088250c87cf11b798c84dc470a6c7d.tar.gz
vyos-1x-61a7a19562088250c87cf11b798c84dc470a6c7d.zip
T8445: set activation hint during install image
Diffstat (limited to 'src')
-rwxr-xr-xsrc/op_mode/image_installer.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/op_mode/image_installer.py b/src/op_mode/image_installer.py
index 27d8214c3..07f69ccd5 100755
--- a/src/op_mode/image_installer.py
+++ b/src/op_mode/image_installer.py
@@ -46,6 +46,7 @@ from vyos.configtree import ConfigTree
from vyos.config_mgmt import unsaved_commits
from vyos.defaults import base_dir
from vyos.defaults import directories
+from vyos.defaults import activation_hint
from vyos.flavor import get_image_serial_console
from vyos.remote import download
from vyos.system import disk
@@ -133,6 +134,7 @@ CONST_RESERVED_SPACE: int = (2 + 1 + 256) * 1024**2
# define directories and paths
DIR_CONFIG: str = directories['config']
+DIR_DATA: str = directories['data']
DIR_INSTALLATION: str = '/mnt/installation'
DIR_ROOTFS_SRC: str = f'{DIR_INSTALLATION}/root_src'
DIR_ROOTFS_DST: str = f'{DIR_INSTALLATION}/root_dst'
@@ -1041,6 +1043,14 @@ def install_image() -> None:
write_dir: str = f'{DIR_DST_ROOT}/boot/{image_name}/rw'
raid.update_default(write_dir)
+ # set activation hint
+ target_data_dir: str = f'{DIR_DST_ROOT}/boot/{image_name}/rw{DIR_DATA}/'
+ data_path = Path(target_data_dir)
+ data_path.mkdir(parents=True)
+ data_path.chmod(0o755)
+ init_hint = data_path.joinpath(Path(activation_hint).name)
+ init_hint.touch()
+
setup_grub(DIR_DST_ROOT)
# add information about version
grub.create_structure()