Skip to content

Commit

Permalink
bail on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-bonez committed Nov 15, 2024
1 parent f7090ba commit fb30dcc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build/lib/scripts/chroot-and-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ if [ "$CHROOT_RES" -eq 0 ]; then

echo 'Upgrading...'

time mksquashfs /media/startos/next /media/startos/images/next.squashfs -b 4096 -comp gzip
if ! time mksquashfs /media/startos/next /media/startos/images/next.squashfs -b 4096 -comp gzip; then
umount -R /media/startos/next
umount -R /media/startos/upper
rm -rf /media/startos/upper /media/startos/next
exit 1
fi
hash=$(b3sum /media/startos/images/next.squashfs | head -c 32)
mv /media/startos/images/next.squashfs /media/startos/images/${hash}.rootfs
ln -rsf /media/startos/images/${hash}.rootfs /media/startos/config/current.rootfs
Expand Down

0 comments on commit fb30dcc

Please sign in to comment.