diff options
| author | John Estabrook <jestabro@vyos.io> | 2025-11-14 09:06:44 -0600 |
|---|---|---|
| committer | John Estabrook <jestabro@vyos.io> | 2025-11-14 09:40:07 -0600 |
| commit | cf8f8926258343d2a96b1bd72e7c89fff2d02767 (patch) | |
| tree | 823483625516bdcd0b69eb7271a2030c69e09fa8 /src | |
| parent | dac6ca177f3229ed42b4028420a4522b2bb600c6 (diff) | |
| download | vyos-1x-cf8f8926258343d2a96b1bd72e7c89fff2d02767.tar.gz vyos-1x-cf8f8926258343d2a96b1bd72e7c89fff2d02767.zip | |
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.
Diffstat (limited to 'src')
| -rwxr-xr-x | src/op_mode/image_installer.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |
