Modified cleanup
This commit is contained in:
parent
3dbbbd6df6
commit
8aae06a4b2
|
@ -1,7 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
[[ -n $loopback ]] && losetup -d "$loopback"
|
if losetup $loopback &>/dev/null; then
|
||||||
|
losetup -d "$loopback"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
usage() { echo "Usage: $0 [-s] imagefile.img [newimagefile.img]"; exit -1; }
|
usage() { echo "Usage: $0 [-s] imagefile.img [newimagefile.img]"; exit -1; }
|
||||||
|
|
Loading…
Reference in New Issue