Author: mzugec
Date: Mon Aug 13 18:33:42 2007
New Revision: 40239
URL: http://svn.opensuse.org/viewcvs/yast?rev=40239&view=rev
Log:
autoyast support for aliases (F302300)
Modified:
trunk/network/VERSION
trunk/network/package/yast2-network.changes
trunk/network/src/clients/lan_auto.ycp
trunk/network/src/modules/Lan.ycp
trunk/network/src/modules/LanItems.ycp
Modified: trunk/network/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/VERSION?rev=40239&r1=40238&r2=40239&view=diff
==============================================================================
--- trunk/network/VERSION (original)
+++ trunk/network/VERSION Mon Aug 13 18:33:42 2007
@@ -1 +1 @@
-2.15.59
+2.15.60
Modified: trunk/network/package/yast2-network.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/package/yast2-network.changes?rev=40239&r1=40238&r2=40239&view=diff
==============================================================================
--- trunk/network/package/yast2-network.changes (original)
+++ trunk/network/package/yast2-network.changes Mon Aug 13 18:33:42 2007
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Aug 13 18:38:29 CEST 2007 - mzugec@suse.cz
+
+- autoyast support for aliases (F302300)
+- 2.15.60
+
+-------------------------------------------------------------------
Fri Aug 10 20:34:21 CEST 2007 - kmachalkova@suse.cz
- Allow specifying different hostnames for different (static) IPs
Modified: trunk/network/src/clients/lan_auto.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/clients/lan_auto.ycp?rev=40239&r1=40238&r2=40239&view=diff
==============================================================================
--- trunk/network/src/clients/lan_auto.ycp (original)
+++ trunk/network/src/clients/lan_auto.ycp Mon Aug 13 18:33:42 2007
@@ -81,7 +81,8 @@
// uppercase map keys
string newk = nil;
interface = mapmap(string k, string v, interface, ``{
- newk = toupper(k);
+ if (k=="aliases") newk="_aliases";
+ else newk = toupper(k);
return $[newk: v];
});
@@ -165,16 +166,19 @@
map newmap = $[];
foreach(string key, any val, (map) devmap, {
y2milestone("Adding: %1=%2", key, val);
+
if (key!="_aliases")
{
if ( size((string)val) > 0 && ( !contains(discard, key) && !contains(discard, tolower(key))))
newmap[tolower(key)] = (string)val;
}
- else
- {
- // FIXME: handle aliases
- y2debug("val: %1", val);
- }
+ else {
+ // handle aliases
+ y2debug("val: %1", val);
+ // if aliases are empty, then ommit it
+ if (size((map)val)>0) newmap[tolower("aliases")] = val;
+ }
+
});
if (deletechars(num, "0123456789") == "")
newmap["device"] = device + num;
@@ -223,13 +227,11 @@
ret["routing"] = settings["routing"]:$[];
if (size(interfaces) > 0 )
ret["interfaces"] = interfaces;
-
return (ret);
}
-
if(func == "Summary") {
ret = Lan::Summary("summary")[0]:"";
}
@@ -268,8 +270,8 @@
}
else if (func == "Write") {
boolean progress_orig = Progress::set (false);
- Lan::PrepareForAutoinst();
- Lan::Autoinstall();
+// Lan::PrepareForAutoinst();
+// Lan::Autoinstall();
ret = Lan::WriteOnly();
if (LanItems::autoinstall_settings["strict_IP_check_timeout"]:nil != nil)
{
Modified: trunk/network/src/modules/Lan.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/Lan.ycp?rev=40239&r1=40238&r2=40239&view=diff
==============================================================================
--- trunk/network/src/modules/Lan.ycp (original)
+++ trunk/network/src/modules/Lan.ycp Mon Aug 13 18:33:42 2007
@@ -465,12 +465,17 @@
*/
global define boolean Import(map settings) {
- if (!Mode::autoinst()) {
+ if (Mode::autoinst()) {
// FIXME: MOD Modules = (map) eval(settings["modules"]:$[]);
NetworkDevices::Import("netcard", (map) settings["devices"]:$[]);
-// NetworkModules::Import("netcard", (map) settings["hwcfg"]:$[]);
+
} else {
- LanItems::autoinstall_settings = settings;
+// LanItems::autoinstall_settings = settings;
+ NetworkDevices::Import("netcard", (map) settings["devices"]:$[]);
+ foreach(string device, NetworkDevices::List(""), {
+ LanItems::AddNew();
+ LanItems::Items[LanItems::current]=$["ifcfg":device];
+ });
}
NetworkConfig::Import(settings["config"]:$[]);
Modified: trunk/network/src/modules/LanItems.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/LanItems.ycp?rev=40239&r1=40238&r2=40239&view=diff
==============================================================================
--- trunk/network/src/modules/LanItems.ycp (original)
+++ trunk/network/src/modules/LanItems.ycp Mon Aug 13 18:33:42 2007
@@ -426,7 +426,6 @@
/* common stuff */
description = sel["name"]:"";
type = sel["type"]:"eth";
-y2internal("type %1", type);
hotplug = sel["hotplug"]:"";
Requires = sel["requires"]:[];
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org