From cf8f8926258343d2a96b1bd72e7c89fff2d02767 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Fri, 14 Nov 2025 09:06:44 -0600 Subject: T7994: fix regression in check for previous installations on install After T7836: move bind mount of /config to vyos-1x, the bind mount is configured at boot, not within the initrd. On image install, one needs to check for previous installations in the resident directory /opt/vyatta/etc/config of the mounted disk. --- src/op_mode/image_installer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/op_mode/image_installer.py b/src/op_mode/image_installer.py index 92e649789..d17cfb2af 100755 --- a/src/op_mode/image_installer.py +++ b/src/op_mode/image_installer.py @@ -274,7 +274,7 @@ def search_previous_installation(disks: list[str]) -> None: if disk.partition_mount(partition, mnt_tmp): if Path(mnt_tmp + '/boot').exists(): for path in Path(mnt_tmp + '/boot').iterdir(): - if path.joinpath('rw/config/.vyatta_config').exists(): + if path.joinpath('rw/opt/vyatta/etc/config/.vyatta_config').exists(): image_data.append((path.name, partition)) if Path(mnt_tmp + '/luks').exists(): for path in Path(mnt_tmp + '/luks').iterdir(): @@ -327,7 +327,7 @@ def search_previous_installation(disks: list[str]) -> None: disk.partition_mount(image_drive, mnt_tmp) if not encrypted: - copytree(f'{mnt_tmp}/boot/{image_name}/rw/config', mnt_config) + copytree(f'{mnt_tmp}/boot/{image_name}/rw/opt/vyatta/etc/config', mnt_config) else: copy(f'{mnt_tmp}/luks/{image_name}', mnt_encrypted_config) -- cgit v1.2.3