From f4f6200f360a4acc6a5123f48645adf15f9af152 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Fri, 23 Nov 2018 17:35:24 +0100 Subject: [PATCH] make_mirror.sh: only (u)mount cover_db.img if it exists --- make_mirror.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/make_mirror.sh b/make_mirror.sh index 1e1380d..fca47c9 100755 --- a/make_mirror.sh +++ b/make_mirror.sh @@ -197,12 +197,16 @@ cat << 'END' > worker.sh mount -t 9p -o trans=virtio,access=any mmdebstrap /mnt ( cd /mnt; - mkdir -p cover_db - mount -o loop,umask=000 cover_db.img cover_db + if [ -e cover_db.img ]; then + mkdir -p cover_db + mount -o loop,umask=000 cover_db.img cover_db + fi sh ./test.sh ret=$? - df -h cover_db - umount cover_db + if [ -e cover_db.img ]; then + df -h cover_db + umount cover_db + fi echo $ret ) > /mnt/result.txt 2>&1 umount /mnt