Skip to content

Commit

Permalink
Merge pull request #71 from ls-zhu/master
Browse files Browse the repository at this point in the history
change RE for LUN path
  • Loading branch information
ls-zhu committed May 2, 2018
2 parents 3a90cbf + 2d71f20 commit 3be811d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions package/yast2-iscsi-lio-server.changes
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed May 2 09:43:35 UTC 2018 - lszhu@suse.com

- bsc#1091626
Change regular expression for matching a LUN path, in order
to pick file names include special characters.
- 4.10

-------------------------------------------------------------------
Sat Apr 28 05:59:05 UTC 2018 - lszhu@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-iscsi-lio-server.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-iscsi-lio-server
Version: 4.0.9
Version: 4.0.10
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
4 changes: 2 additions & 2 deletions src/include/iscsi-lio-server/TargetData.rb
Expand Up @@ -323,7 +323,7 @@ class TargetData
#match lun name like [fileio/iscsi_file1 or [block/iscsi_sdb
RE_LUN_NAME = /\[(fileio|block)\/[\w\_\-\d]+\s/
#match lun patch like:(/home/lszhu/target1.raw) or (/dev/sdb)
RE_LUN_PATH = /[(]\/(\w|\.|\/)+[)]/
RE_LUN_PATH = /\(\/.+\)\ /
# match portal like 0.12.121.121:3260
RE_PORTAL = /(\d{1,3}\.){3}\d{1,3}:\d{1,5}/

Expand Down Expand Up @@ -468,7 +468,7 @@ def analyze
# lun_num_int is a number like 1,3,57.
lun_num_int = lun_num[3,lun_num.length]
lun_path_tmp = RE_LUN_PATH.match(line).to_s
lun_path = lun_path_tmp[1,lun_path_tmp.length-2]
lun_path = lun_path_tmp[1,lun_path_tmp.length-3]
if !File.exist?(lun_path)
msg = format(_("Cannot access the storage %s.\n" \
"Please consider reconnecting the storage or\n" \
Expand Down

0 comments on commit 3be811d

Please sign in to comment.