Author: mzugec
Date: Thu Mar 11 10:24:21 2010
New Revision: 61247
URL: http://svn.opensuse.org/viewcvs/yast?rev=61247&view=rev
Log:
L3: update device name via which is system installed by AY
(bnc#578760)
Modified:
branches/SuSE-Code-11-SP1-Branch/network/VERSION
branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes
branches/SuSE-Code-11-SP1-Branch/network/src/clients/save_network.ycp
branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanUdevAuto.ycp
Modified: branches/SuSE-Code-11-SP1-Branch/network/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/VERSION?rev=61247&r1=61246&r2=61247&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/VERSION (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/VERSION Thu Mar 11 10:24:21 2010
@@ -1 +1 @@
-2.17.124
+2.17.125
Modified: branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes?rev=61247&r1=61246&r2=61247&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes Thu Mar 11 10:24:21 2010
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu Mar 11 10:19:16 CET 2010 - mzugec@suse.cz
+
+- L3: update device name via which is system installed by AY
+(bnc#578760)
+- 2.17.125
+
+-------------------------------------------------------------------
Tue Mar 9 12:51:18 CET 2010 - kmachalkova@suse.cz
- Don't check for presence of static IPs when deciding whether to
Modified: branches/SuSE-Code-11-SP1-Branch/network/src/clients/save_network.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/src/clients/save_network.ycp?rev=61247&r1=61246&r2=61247&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/src/clients/save_network.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/src/clients/save_network.ycp Thu Mar 11 10:24:21 2010
@@ -32,6 +32,7 @@
// global variable because chrooted environment
integer network_disk=0;
+string netdevice="";
/**
* Read one install.inf item
@@ -116,6 +117,13 @@
/* Split network device */
string netdevice = InstallInf["netdevice"]:"";
+ if (Mode::autoinst()){
+ string new_devname = LanUdevAuto::GetDevnameByMAC(InstallInf["hwaddr"]:"");
+ if (size(new_devname)>0){
+ y2internal("old devname: %1, new devname: %2", netdevice, new_devname);
+ netdevice=new_devname;
+ }
+ }
if(netdevice != "") {
string devtype = NetworkInterfaces::device_type(netdevice);
if(devtype != nil && devtype != "") InstallInf["type"] = devtype;
@@ -307,9 +315,9 @@
if (size(InstallInf["remote_ip"]:"")>0)
network_configuration = sformat("%1REMOTE_IPADDR='%2'\n", network_configuration, InstallInf["remote_ip"]:"");
- string ifcfg = sformat("ifcfg-%1", InstallInf["netdevice"]:"");
+ string ifcfg = sformat("ifcfg-%1", netdevice);
- string hw_name = BuildDescription(NetworkInterfaces::device_type(InstallInf["netdevice"]:""), NetworkInterfaces::device_num(ifcfg), $["dev_name":InstallInf["netdevice"]:""], hardware);
+ string hw_name = BuildDescription(NetworkInterfaces::device_type(netdevice), NetworkInterfaces::device_num(ifcfg), $["dev_name":netdevice], hardware);
// protect special characters, #305343
if (size(hw_name)>0)
network_configuration = sformat("%1NAME='%2'\n", network_configuration, String::Quote (hw_name));
@@ -320,13 +328,8 @@
string dev_file=sformat("/etc/sysconfig/network/%1", ifcfg);
// string dev_file=sformat("/tmp/%1", ifcfg);
-// if (!FileUtils::Exists(dev_file))
-// {
SCR::Write(.target.string, dev_file, network_configuration);
y2milestone("ifcfg file: %1", dev_file);
-// }
-// else
-// y2warning("File exists %1", dev_file);
}
/*
@@ -518,7 +521,7 @@
y2milestone("%1 does not exist yet, creating it", udev_rules_destdir);
WFM::Execute (.local.bash, sformat ("mkdir -p '%1'", udev_rules_destdir));
} else
- y2internal("file %1 exists", udev_rules_destdir);
+ y2milestone("File %1 exists", udev_rules_destdir);
if (! FileUtils::Exists( net_destfile ))
{
Modified: branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanUdevAuto.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanUdevAuto.ycp?rev=61247&r1=61246&r2=61247&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanUdevAuto.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanUdevAuto.ycp Thu Mar 11 10:24:21 2010
@@ -200,14 +200,6 @@
}
});
} else{
-/*
- list<map> all_devices=[];
-y2internal("export devices %1", devices);
- foreach(string key, (list<string>)Map::Keys(devices), {
- all_devices=add(all_devices, devices[key]:$[]);
- });
- y2internal("export rules %1", createUdevFromIfaceName(all_devices));
-*/
foreach(integer id, map