From 3a7975bd9bfd4130c524e264bed57b973e89a247 Mon Sep 17 00:00:00 2001 From: Ronny Nilsson Date: Wed, 4 Dec 2019 15:18:51 +0100 Subject: [PATCH] iopupgrade: Configuration handling has been moved into the iopu_chroot script. --- iopupgrade/files/sbin/iopu | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/iopupgrade/files/sbin/iopu b/iopupgrade/files/sbin/iopu index ad00a7494..e89df21c0 100755 --- a/iopupgrade/files/sbin/iopu +++ b/iopupgrade/files/sbin/iopu @@ -266,26 +266,24 @@ fi log "Firmware programmed to flash." - -log "Transfering configuration to new system." - # Force upgrade of boot loader [ $upd_forceboot -eq 1 ] && chroot_cmdline="$chroot_cmdline -b" -[ $upd_keepconfig -eq 1 ] && chroot_cmdline="$chroot_cmdline -c" + +if [ $upd_keepconfig -eq 1 ]; then + log "Transfering configuration to new system." + chroot_cmdline="$chroot_cmdline -c" +fi mount_newroot -chroot /tmp/newroot_overlay /sbin/iopu_chroot $chroot_cmdline +if ! chroot /tmp/newroot_overlay /sbin/iopu_chroot $chroot_cmdline; then + log "Configuration migration failed!" + exit 1 +fi umount_newroot log "New firmware fully installed." run_cleanup=0 -# handle configuration -if [ $upd_keepconfig -eq 1 ] -then - # newroot_exec /sbin/iopu_configurationsystem - log "Configuration handling not done yet!" -fi # Now make sure that we actually boot the new system on the next reboot upd_finnish