scstadmin: Escape special characters in initiator names in the LUN masking section

Write out e.g. "INITIATOR iqn.1994-05.com.redhat:29a5cc399d\#192.168.11.1"
instead of "INITIATOR iqn.1994-05.com.redhat:29a5cc399d#192.168.11.1" when
generating a config file such that the hash sign is read in properly when
rereading the SCST config file.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4907 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2013-07-01 11:57:19 +00:00
parent 8cf1f2afc6
commit 21c8cfa9f1

View File

@@ -1532,7 +1532,7 @@ sub writeConfiguration {
my $init_buff;
foreach my $init (sort @{$inits}) {
$init_buff .= "\n\t\t\tINITIATOR $init";
$init_buff .= "\n\t\t\tINITIATOR " . escapeMeta($init);
my $attributes = $SCST->initiatorAttributes($driver, $target, $group, $init);