diff --git a/Dockerfile b/Dockerfile index bdfab5a..b79ce59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -209,7 +209,7 @@ RUN echo "Building for platform '$TARGETPLATFORM'" \ && ssh root@localhost -p $SSH_PORT "${PACKAGE_REMOVE} openssh-sftp-server" \ \ # Sync changes into image and shutdown qemu \ - && ssh root@localhost -p $SSH_PORT 'sync; halt' \ + && ssh root@localhost -p $SSH_PORT 'sync; poweroff' \ && while kill -0 $QEMU_PID 2>/dev/null; do echo "Waiting for qemu exit ..."; sleep 1; done \ \ && gzip /var/vm/squashfs-combined-${OPENWRT_VERSION}.img \ diff --git a/src/migrate_openwrt_rootfs.sh b/src/migrate_openwrt_rootfs.sh index 39389f6..c28d0b9 100644 --- a/src/migrate_openwrt_rootfs.sh +++ b/src/migrate_openwrt_rootfs.sh @@ -88,7 +88,7 @@ if [ -f /storage/old_version ]; then ssh root@localhost -p 1022 "chroot /mnt /sbin/sysupgrade -r /tmp/openwrt_config.tar.gz" # Stop VM - ssh root@localhost -p 1022 'sync; halt' + ssh root@localhost -p 1022 'sync; poweroff' while kill -0 $QEMU_PID 2>/dev/null; do echo "Waiting for qemu exit ..."; sleep 1; done; # Delete temporary OpenWrt image @@ -100,4 +100,4 @@ if [ -f /storage/old_version ]; then if [ -f storage/config-`basename $OLD_SQUASHFS_COMBINED.img`.tar.gz ]; then rm /storage/config-`basename $OLD_SQUASHFS_COMBINED.img`.tar.gz fi -fi \ No newline at end of file +fi