Merge "Do not try to detach non-existant loopback devices"

This commit is contained in:
Jenkins 2014-10-09 05:46:46 +00:00 committed by Gerrit Code Review
commit 71d4da7d7e

View file

@ -216,7 +216,7 @@ function detach_loopback() {
# loopback dev may be tied up a bit by udev events triggered by partition events
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
fi
echo $loopdev may be busy, sleeping up to $try more seconds...