Merge "Do not try to detach non-existant loopback devices"
This commit is contained in:
commit
71d4da7d7e
@ -216,7 +216,7 @@ function detach_loopback() {
|
|||||||
|
|
||||||
# loopback dev may be tied up a bit by udev events triggered by partition events
|
# loopback dev may be tied up a bit by udev events triggered by partition events
|
||||||
for try in $(seq 10 -1 1) ; do
|
for try in $(seq 10 -1 1) ; do
|
||||||
if sudo losetup -d $loopdev ; then
|
if ! sudo losetup $loopdev || sudo losetup -d $loopdev ; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
echo $loopdev may be busy, sleeping up to $try more seconds...
|
echo $loopdev may be busy, sleeping up to $try more seconds...
|
||||||
|
Loading…
Reference in New Issue
Block a user