[yast-commit] r67191 - /branches/SuSE-Code-11-SP2-Branch/network/src/clients/lan_auto.ycp
Author: mvidner Date: Fri Jan 13 15:39:18 2012 New Revision: 67191 URL: http://svn.opensuse.org/viewcvs/yast?rev=67191&view=rev Log: Reindented Modified: branches/SuSE-Code-11-SP2-Branch/network/src/clients/lan_auto.ycp Modified: branches/SuSE-Code-11-SP2-Branch/network/src/clients/lan_auto.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/network/src/clients/lan_auto.ycp?rev=67191&r1=67190&r2=67191&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/network/src/clients/lan_auto.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/network/src/clients/lan_auto.ycp Fri Jan 13 15:39:18 2012 @@ -70,27 +70,29 @@ */ define map FromAY(map input) { - y2debug("input %1", input); + y2debug("input %1", input); - list<map<string,any> > ifaces=[]; - foreach(map<string,any> interface, input["interfaces"]:[], { - map<string,any> iface=$[]; - foreach(string key, any value, interface, { - if (key == "aliases"){ - foreach(string k, map<string,any > v, (map<string, map<string,any> >)value, { - // replace "alias0" to "0" (bnc#372687) - map<string,any> t = (map<string,any>)value; - t[v["LABEL"]:""]=t[k]:$[]; - t=remove(t,k); - value=t; - }); - } else - if (key=="device") value = LanUdevAuto::getDeviceName(tostring(value)); - iface[key]=value; - }); - ifaces = add(ifaces, iface); - }); - input["interfaces"] = ifaces; + list<map<string,any> > ifaces=[]; + foreach(map<string,any> interface, input["interfaces"]:[], { + map<string,any> iface=$[]; + foreach(string key, any value, interface, { + if (key == "aliases"){ + foreach(string k, map<string,any > v, (map<string, map<string,any> >)value, { + // replace "alias0" to "0" (bnc#372687) + map<string,any> t = (map<string,any>)value; + t[v["LABEL"]:""]=t[k]:$[]; + t=remove(t,k); + value=t; + }); + } + else if (key=="device") { + value = LanUdevAuto::getDeviceName(tostring(value)); + } + iface[key]=value; + }); + ifaces = add(ifaces, iface); + }); + input["interfaces"] = ifaces; map<string,map> interfaces = listmap(map<string, any> interface, (list<map<string, any> >)input["interfaces"]:[], @@ -284,29 +286,29 @@ ret = LanAutoSequence(""); } else if(func == "Import") { - // see bnc#498993 - // in case keep_install_network is set to true (in AY) - // and there is no dns and routing definition, - // we'll keep values from installation - if(param["keep_install_network"]:false==true) { - y2milestone("keep_install_network is enabled"); - if(param["dns"]:$[]==$[] && param["routing"]:$[]==$[]){ - y2milestone("DNS and routing are not defined in AY, will keep settings from installation"); - // read settings from installation - Lan::Read(`cache); - // export settings into AY map - map from_system=Lan::Export(); - map dns=from_system["dns"]:$[]; - map routing=from_system["routing"]:$[]; - // merge with param - param["dns"]=dns; - param["routing"]=routing; - y2milestone("dns %1", dns); - y2milestone("routing %1", routing); - } else{ - y2milestone("DNS and routing defined in AY profile, will use it"); - } - } + // see bnc#498993 + // in case keep_install_network is set to true (in AY) + // and there is no dns and routing definition, + // we'll keep values from installation + if(param["keep_install_network"]:false==true) { + y2milestone("keep_install_network is enabled"); + if(param["dns"]:$[]==$[] && param["routing"]:$[]==$[]){ + y2milestone("DNS and routing are not defined in AY, will keep settings from installation"); + // read settings from installation + Lan::Read(`cache); + // export settings into AY map + map from_system=Lan::Export(); + map dns=from_system["dns"]:$[]; + map routing=from_system["routing"]:$[]; + // merge with param + param["dns"]=dns; + param["routing"]=routing; + y2milestone("dns %1", dns); + y2milestone("routing %1", routing); + } else{ + y2milestone("DNS and routing defined in AY profile, will use it"); + } + } map new = FromAY(param); Lan::Import(new); ret = true; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mvidner@svn2.opensuse.org