[Pkg-iscsi-maintainers] Bug#745708: open-iscsi: umountiscsi.sh prematurely exits when encountering targets without block devices
Ritesh Raj Sarraf
rrs at debian.org
Fri Apr 25 06:47:09 UTC 2014
On 04/25/2014 11:48 AM, Sammy Atmadja wrote:
>> Patch looks good. But just a quick question. If the specific target
>> session does not have any block device, wouldn't BLOCK_FILE be empty
>> and thus not fall under the if condition ?
> BLOCK_FILE will not be empty, and *that* is exactly the root of the
> problem. When the wildcards in the following line:
> for BLOCK_FILE in $SESSION_DIR/target*/*\:*/block/*; do
> do not match anything, BLOCK_FILE will be:
> $SESSION_DIR/target*/*\:*/block/*
> like for ex. in my case :
> /sys/devices/platform/host5/session3/target*/*:*/block/*
>
> In the next line we strip all but the last part, so we end up with *,
> and a few lines later basically try to umount /dev/* .
>
> It's due to the somewhat unintuitive behaviour of the * wildcard. When
> it doesn't match, you get the litteral * .
>
> Sammy
>
> Disclaimer: http://transtrend.com/disclaimer.txt
Thanks. Makes sense. I will prepare an upload soon.
--
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-iscsi-maintainers/attachments/20140425/e18534fc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-iscsi-maintainers/attachments/20140425/e18534fc/attachment.sig>
More information about the Pkg-iscsi-maintainers
mailing list