diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2013-10-22 16:10:20 +0200 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2013-10-22 16:24:39 +0200 |
commit | b109bfc1ef7e20a72170a83dc9244c8b21ea658c (patch) | |
tree | a9b7ad8bfc3b4a2033f2a5988e262e6809023447 /scripts/blkdeactivate.sh.in | |
parent | c3f44a0c66abf8916bebafe2de9da30132cea9e2 (diff) | |
download | lvm2-b109bfc1ef7e20a72170a83dc9244c8b21ea658c.tar.gz |
blkdeactivate: fix endless loop if device(s) given and unable to umount/deactivate
The blkdeactivate script iterates over the list of devices if they're
given as an argument and it tries to umount/deactivate them one by one.
This iteration failed to proceed if any of the umount/deactivation
was unsuccessful - there was a missing "shift" call to move to the
next argument (device) for processing. As a result of this, the same
device was tried again and again, causing an endless loop, never
proceeding to the next device given.
Diffstat (limited to 'scripts/blkdeactivate.sh.in')
-rw-r--r-- | scripts/blkdeactivate.sh.in | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in index b6d0117b1..f45415434 100644 --- a/scripts/blkdeactivate.sh.in +++ b/scripts/blkdeactivate.sh.in @@ -323,7 +323,10 @@ deactivate_all() { $LSBLK_READ <<< "`$LSBLK --nodeps $1`" # check if the device is not on the skip list already - test -z ${SKIP_DEVICE_LIST["$kname"]} || continue + test -z ${SKIP_DEVICE_LIST["$kname"]} || { + shift + continue + } deactivate else |