From 9a868ed27605cc5058e147659d1f6d8bde8e05da Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 9 Sep 2024 16:29:38 +0200 Subject: [PATCH] Also ensure that the squashfs works when asked for its existence --- shutorial-admin.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/shutorial-admin.sh b/shutorial-admin.sh index f32381c..b793bc3 100644 --- a/shutorial-admin.sh +++ b/shutorial-admin.sh @@ -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