mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
fix deadlock on install (#2667)
* fix deadlock on install * improve pruning script * bump tokio
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
avahi-daemon
|
||||
avahi-utils
|
||||
b3sum
|
||||
bash-completion
|
||||
beep
|
||||
bmon
|
||||
|
||||
@@ -85,7 +85,7 @@ if [ "$CHROOT_RES" -eq 0 ]; then
|
||||
echo 'Upgrading...'
|
||||
|
||||
time mksquashfs /media/startos/next /media/startos/images/next.squashfs -b 4096 -comp gzip
|
||||
hash=$(start-cli util b3sum /media/startos/images/next.squashfs | head -c 32)
|
||||
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
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ if [ -h /media/startos/config/current.rootfs ] && [ -e /media/startos/config/cur
|
||||
echo 'Pruning...'
|
||||
current="$(readlink -f /media/startos/config/current.rootfs)"
|
||||
while [[ "$(df -B1 --output=avail --sync /media/startos/images | tail -n1)" -lt "$needed" ]]; do
|
||||
to_prune="$(ls -t1 /media/startos/images/*.rootfs | grep -v "$current" | tail -n1)"
|
||||
to_prune="$(ls -t1 /media/startos/images/*.rootfs /media/startos/images/*.squashfs | grep -v "$current" | tail -n1)"
|
||||
if [ -e "$to_prune" ]; then
|
||||
echo " Pruning $to_prune"
|
||||
rm -rf "$to_prune"
|
||||
|
||||
Reference in New Issue
Block a user