Skip to content

Commit

Permalink
Also ensure that the squashfs works when asked for its existence
Browse files Browse the repository at this point in the history
  • Loading branch information
mquinson committed Sep 9, 2024
1 parent 98e4eb9 commit 9a868ed
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion shutorial-admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,16 @@ case "$1" in
;;
ensure-squashfs)
if [ -e "/usr/lib/shutorial/debian-stable.squashfs" ] ; then
echo "The shutorial squashfs already exists. Good."
session=$(schroot --chroot shutorial --begin-session)
schroot --run ls >/dev/null 2>&1
worked=$?
schroot --end-session -c $session
if [ x$worked = x0 ] ; then
echo "The shutorial squashfs already exists and is working. Good."
else
echo "The existing shutorial squashfs does not work. Rebuild it."
squashfs_build
fi
else
echo "Rebuild the missing shutorial squashfs."
squashfs_build
Expand Down

0 comments on commit 9a868ed

Please sign in to comment.