Author: jsuchome Date: Mon Apr 23 09:56:00 2012 New Revision: 67978 URL: http://svn.opensuse.org/viewcvs/yast?rev=67978&view=rev Log: read status of container Modified: branches/SuSE-Code-11-SP2-Branch/lxc/src/Lxc.ycp Modified: branches/SuSE-Code-11-SP2-Branch/lxc/src/Lxc.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/lxc/src/Lxc.ycp?rev=67978&r1=67977&r2=67978&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/lxc/src/Lxc.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/lxc/src/Lxc.ycp Mon Apr 23 09:56:00 2012 @@ -94,14 +94,15 @@ list<term> ret = []; map out = (map) SCR::Execute (.target.bash_output, "lxc-ls -1"); -out["stdout"] = "suse1\nsles\n"; + foreach (string line, sort (splitstring (out["stdout"]:"", "\n")), { if (line != "") { string cmd= sformat ("lxc-info -n %1 | grep state", line); out = (map) SCR::Execute (.target.bash_output, cmd, $[ "LANG" : "C" ]); - // FIXME read status - ret = add (ret, `item (line, _("Stopped"))); + list<string> state = splitstring (deletechars (out["stdout"]:"", " \t\n"), ":"); + ret = add (ret, `item (line, state[1]:"")); + // FIXME translate } }); return ret; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org