make_mirror.sh: only (u)mount cover_db.img if it exists
This commit is contained in:
parent
4ef1eda200
commit
f4f6200f36
1 changed files with 8 additions and 4 deletions
|
@ -197,12 +197,16 @@ cat << 'END' > worker.sh
|
||||||
mount -t 9p -o trans=virtio,access=any mmdebstrap /mnt
|
mount -t 9p -o trans=virtio,access=any mmdebstrap /mnt
|
||||||
(
|
(
|
||||||
cd /mnt;
|
cd /mnt;
|
||||||
mkdir -p cover_db
|
if [ -e cover_db.img ]; then
|
||||||
mount -o loop,umask=000 cover_db.img cover_db
|
mkdir -p cover_db
|
||||||
|
mount -o loop,umask=000 cover_db.img cover_db
|
||||||
|
fi
|
||||||
sh ./test.sh
|
sh ./test.sh
|
||||||
ret=$?
|
ret=$?
|
||||||
df -h cover_db
|
if [ -e cover_db.img ]; then
|
||||||
umount cover_db
|
df -h cover_db
|
||||||
|
umount cover_db
|
||||||
|
fi
|
||||||
echo $ret
|
echo $ret
|
||||||
) > /mnt/result.txt 2>&1
|
) > /mnt/result.txt 2>&1
|
||||||
umount /mnt
|
umount /mnt
|
||||||
|
|
Loading…
Reference in a new issue