Fix mount
This commit is contained in:
parent
4f2ef1e3a9
commit
66f579b634
1 changed files with 3 additions and 1 deletions
|
@ -93,10 +93,12 @@ else
|
|||
do_cleanup() {
|
||||
if mountpoint -q "$DST_PK3_FILE"; then
|
||||
umount "$DST_PK3_FILE" &>/dev/null
|
||||
rm "${DST_PK3_FILE}"
|
||||
fi
|
||||
}
|
||||
if [ ! -e "$DST_PK3_FILE" ]; then
|
||||
mount --bind "$PK3_FILE" "$DST_PK3_FILE" >/dev/null 2>&1
|
||||
touch "$DST_PK3_FILE"
|
||||
mount -o ro,bind "$PK3_FILE" "$DST_PK3_FILE" >/dev/null 2>&1
|
||||
trap do_cleanup EXIT
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue