diff --git a/lsinitrd.sh b/lsinitrd.sh index 28abe5a6..9b71bf55 100755 --- a/lsinitrd.sh +++ b/lsinitrd.sh @@ -239,7 +239,10 @@ list_squash_content() { erofs-root.img) mkdir -p "$EROFS_TMPMNT" mount -t erofs "$SQUASH_TMPFILE" "$EROFS_TMPMNT" - (cd $EROFS_TMPMNT; find "$EROFS_TMPMNT" -ls) + ( + cd "$EROFS_TMPMNT" || exit 1 + find "$EROFS_TMPMNT" -ls + ) umount "$EROFS_TMPMNT" ;; esac