Skip to content

Commit

Permalink
explicitely use LC_ALL=POSIX when parsing output (bnc#769196)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Fehr committed Oct 1, 2012
1 parent 34accad commit b9d8094
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions package/yast2-iscsi-lio-server.changes
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Oct 1 16:44:32 CEST 2012 - fehr@suse.de

- explicitely use LC_ALL=POSIX when parsing output (bnc#769196)

-------------------------------------------------------------------
Wed Sep 26 17:22:19 CEST 2012 - fehr@suse.de

Expand Down
11 changes: 6 additions & 5 deletions src/IscsiLioData.ycp
Expand Up @@ -431,7 +431,7 @@ global map<string, any> GetConfig()

global list<string> GetIpAddr()
{
map out = (map) SCR::Execute (.target.bash_output, "ifconfig" );
map out = (map) SCR::Execute (.target.bash_output, "LC_ALL=POSIX /sbin/ifconfig" );
list<string> ls = filter( string ln, splitstring( out["stdout"]:"", "\n" ),
``(search(ln,"inet addr:")!=nil));
ls = maplist( string s, ls,
Expand Down Expand Up @@ -493,6 +493,7 @@ void ParseAuthData( string tgt, integer tpg, string clnt,
cmd = "lio_node --showchapauth " + tgt + " " + tpg + " " + clnt;
else
cmd = "lio_node --showchapdiscauth";
cmd = "LC_ALL=POSIX "+cmd;
map out = (map)SCR::Execute(.target.bash_output, cmd );
list<string> ls = SplitStringNE( out["stdout"]:"", "\n" );
integer i=0;
Expand All @@ -513,7 +514,7 @@ void ParseAuthData( string tgt, integer tpg, string clnt,
global map<string,any> ParseConfigLio()
{
map<string, any> tcm = $[];
map out = (map)SCR::Execute(.target.bash_output, "tcm_node --listhbas" );
map out = (map)SCR::Execute(.target.bash_output, "LC_ALL=POSIX tcm_node --listhbas" );
list<string> ls = SplitStringNE( out["stdout"]:"", "\n" );
integer i=0;
while( i<size(ls) )
Expand Down Expand Up @@ -560,7 +561,7 @@ global map<string,any> ParseConfigLio()
}
}
map<string, map> endp = $[];
out = (map)SCR::Execute(.target.bash_output, "lio_node --listendpoints" );
out = (map)SCR::Execute(.target.bash_output, "LC_ALL=POSIX lio_node --listendpoints" );
ls = SplitStringNE( out["stdout"]:"", "\n" );
i=0;
while( i<size(ls) )
Expand Down Expand Up @@ -645,7 +646,7 @@ global map<string,any> ParseConfigLio()
tgmap[tgt,tpg] = $[ "ep" : endp[tgt,tpg]:$[],
"clnt" : $[] ];
y2milestone( "ParseConfigLio tgt:%1 tpg:%2", tgt, tpg );
string cmd = "lio_node --listlunacls " + tgt + " " + tpg;
string cmd = "LC_ALL=POSIX lio_node --listlunacls " + tgt + " " + tpg;
out = (map)SCR::Execute(.target.bash_output, cmd );
ls = SplitStringNE( out["stdout"]:"", "\n" );
i=0;
Expand Down Expand Up @@ -686,7 +687,7 @@ global map<string,any> ParseConfigLio()
if( !isempty(chap[0]:"") && !isempty(chap[1]:"") )
tgmap[tgt,tpg,"clnt",clnt,"incoming"] = [ chap ];
});
cmd = "lio_node --listtpgattr " + tgt + " " + tpg;
cmd = "LC_ALL=POSIX lio_node --listtpgattr " + tgt + " " + tpg;
out = (map)SCR::Execute(.target.bash_output, cmd );
ls = SplitStringNE( out["stdout"]:"", "\n" );
i=0;
Expand Down

0 comments on commit b9d8094

Please sign in to comment.