Author: mzugec
Date: Mon May 28 10:20:39 2007
New Revision: 38154
URL: http://svn.opensuse.org/viewcvs/yast?rev=38154&view=rev
Log:
installation network changes:
http://lists.opensuse.org/yast-devel/2007-05/msg00025.html
Added:
trunk/network/src/routines/save_network.ycp
- copied, changed from r37972, trunk/network/src/routines/install.ycp
Removed:
trunk/network/src/installation/inst_netsetup.ycp
trunk/network/src/routines/install.ycp
trunk/network/testsuite/tests/install.ycp
Modified:
trunk/network/VERSION
trunk/network/package/yast2-network.changes
trunk/network/src/installation/Makefile.am
trunk/network/src/modules/Lan.ycp
trunk/network/src/modules/NetworkStorage.ycp
Modified: trunk/network/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/VERSION?rev=38154&r1=38153&r2=38154&view=diff
==============================================================================
--- trunk/network/VERSION (original)
+++ trunk/network/VERSION Mon May 28 10:20:39 2007
@@ -1 +1 @@
-2.15.33
+2.15.34
Modified: trunk/network/package/yast2-network.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/package/yast2-network.changes?rev=38154&r1=38153&r2=38154&view=diff
==============================================================================
--- trunk/network/package/yast2-network.changes (original)
+++ trunk/network/package/yast2-network.changes Mon May 28 10:20:39 2007
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Mon May 28 10:20:08 CEST 2007 - mzugec@suse.cz
+
+- installation network changes:
+http://lists.opensuse.org/yast-devel/2007-05/msg00025.html
+- 2.15.34
+
+-------------------------------------------------------------------
Fri May 25 13:30:04 CEST 2007 - jsrain@suse.cz
- removed outdated translations from .desktop-files (#271209)
Modified: trunk/network/src/installation/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/installation/Makefile.am?rev=38154&r1=38153&r2=38154&view=diff
==============================================================================
--- trunk/network/src/installation/Makefile.am (original)
+++ trunk/network/src/installation/Makefile.am Mon May 28 10:20:39 2007
@@ -8,7 +8,7 @@
client_DATA = inst_ask_net_test.ycp inst_do_net_test.ycp \
inst_hostname.ycp \
- inst_netprobe.ycp inst_netsetup.ycp
+ inst_netprobe.ycp
EXTRA_DIST = $(ynclude_DATA) $(client_DATA) $(ybin_SCRIPTS)
Modified: trunk/network/src/modules/Lan.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/Lan.ycp?rev=38154&r1=38153&r2=38154&view=diff
==============================================================================
--- trunk/network/src/modules/Lan.ycp (original)
+++ trunk/network/src/modules/Lan.ycp Mon May 28 10:20:39 2007
@@ -189,11 +189,6 @@
// FIXME: MOD list<string> DeletedModules = [];
/**
- * /etc/install.inf data
- */
-map InstallInf = $[];
-
-/**
* Data was modified?
*/
boolean modified = false;
@@ -312,7 +307,7 @@
}
include "network/hardware.ycp";
-include "network/install.ycp";
+//include "network/install.ycp";
include "network/routines.ycp";
include "network/runtime.ycp";
@@ -439,7 +434,7 @@
if(Abort()) return false;
/* Progress step 7/9 */
ProgressNextStage(_("Reading installation information..."));
- ReadInstallInf();
+// ReadInstallInf();
sleep(sl);
if(Abort()) return false;
@@ -1559,9 +1554,10 @@
} else {
// this is the first interface, match the hardware with install.inf
-
+/*
+ // couldn't happen
if (size(InstallInf)>0){
- /* Select the one from install.inf with the same MAC */
+ // Select the one from install.inf with the same MAC
// find H["mac"] == InstallInf["hwaddr"]
if (tosel == nil ) {
string hwaddr = InstallInf["hwaddr"]:"";
@@ -1571,7 +1567,7 @@
y2milestone("Rule: matching hwaddr in install.inf");
}
- /* Select the one from install.inf with the same module */
+ // Select the one from install.inf with the same module
// find H["module"] == InstallInf["module"]
if (tosel == nil) {
string infmodule = InstallInf["module"]:"";
@@ -1580,7 +1576,9 @@
}
y2milestone("Rule: matching module in install.inf");
}
- } else{
+ } else
+*/
+ {
/* No install.inf -> select the first connected */
// find H["active"] == true
if (tosel == nil) {
@@ -1675,7 +1673,7 @@
global define boolean ProposeInterfaces () {
y2milestone("Hardware=%1", Hardware);
- y2milestone("InstallInf=%1", InstallInf);
+// y2milestone("InstallInf=%1", InstallInf);
y2milestone("NetworkConfig::Config=%1", NetworkConfig::Config);
y2milestone("NetworkConfig::DHCP=%1", NetworkConfig::DHCP);
@@ -1710,7 +1708,7 @@
/* Some HW found -> use it for proposal */
if(size(Hardware) > 0) {
if (Arch::s390()){
- tosel = FindMatchingDevice( $["device":sformat("%1-id-%2",InstallInf["module"]:"", InstallInf["hwaddr"]:"")] );
+// tosel = FindMatchingDevice( $["device":sformat("%1-id-%2",InstallInf["module"]:"", InstallInf["hwaddr"]:"")] );
}
else tosel = FindMatchingDevice($[]);
@@ -1720,6 +1718,7 @@
y2debug("Hardware=%1", Hardware);
y2milestone ("Selected HW w/o install.inf patches: %1", tosel);
+/*
// do not select a card without a driver, #29296
if (tosel != nil)
{
@@ -1736,12 +1735,12 @@
// SelectHW relies on the detected info (eg. busid) from hwinfo
// which is not in install.inf
+
if (InstallInf["module"]:"" != "")
{
y2milestone ("Using driver module from install.inf");
tosel["module"] = InstallInf["module"]:"";
}
-
// L3 bug: 75720
// Setup module options available from /etc/install.inf
string _options = InstallModuleOptions(tosel["module"]:"");
@@ -1755,9 +1754,9 @@
// set layer2 status from /etc/install.inf
qeth_layer2 = (InstallInf["QETH_LAYER2_SUPPORT"]:"0"=="1")?true:false;
qeth_macaddress = InstallInf["LLADDR"]:"";
-
}
- /* Nothing detected -> use InstallInf */
+ // Nothing detected -> use InstallInf
+
else if(size(InstallInf) > 0) {
if(!haskey(InstallInf, "module")) {
@@ -1775,10 +1774,12 @@
type = InstallInf["type"]:"eth";
device = NetworkDevices::GetFreeDevice(type);
}
+
else {
y2milestone("No hardware, no install.inf -> no proposal.");
return false;
}
+*/
// here we know the hardware and could fill the interface defaults for it,
// like for wifi usercontrol and for eth|wifi ifplugd.
@@ -1788,24 +1789,24 @@
SetDefaultsForHW ();
// #145041
- ethtool_options = InstallInf["ethtool_options"]:"";
+// ethtool_options = InstallInf["ethtool_options"]:"";
// #176804
- if (NetworkStorage::RootIsOnNetwork ())
+ if (NetworkStorage::RootIsOnNetwork ("/"))
{
startmode = "nfsroot";
y2milestone ("startmode nfsroot");
}
- ipaddr = InstallInf["ipaddr"]:"";
- bootproto = InstallInf["bootproto"]:"static";
+// ipaddr = InstallInf["ipaddr"]:"";
+// bootproto = InstallInf["bootproto"]:"static";
y2debug("ipaddr,bootproto=%1,%2", ipaddr, bootproto);
if(bootproto == "static" && ipaddr != "" && ipaddr != nil) {
y2milestone("static proposal");
/* propose address setup from /etc/install.inf */
- netmask = InstallInf["netmask"]:"";
+// netmask = InstallInf["netmask"]:"";
if(netmask == nil || netmask == "")
netmask = "255.255.255.0";
}
@@ -1854,12 +1855,13 @@
return false;
}
+/*
y2milestone ("hostname from install.inf");
if (! DNS::ReadHostDomain (InstallInf["hostname"]:"",
InstallInf["domain"]:""))
{
y2milestone ("hostname from dns");
- /* try to get hostname from the network */
+ // try to get hostname from the network
string hnent = Detection::ResolveIP(ipaddr);
//last resort - generate random hostname (#165269)
@@ -1876,7 +1878,7 @@
}
}
-
+*/
return true;
}
@@ -1887,10 +1889,10 @@
global define boolean ProposeRoutesAndResolver () {
if(bootproto == "static" && ipaddr != "" && ipaddr != nil) {
/* propose default gateway from /etc/install.inf */
- Routing::ReadFromGateway (InstallInf["gateway"]:"");
+// Routing::ReadFromGateway (InstallInf["gateway"]:"");
/* propose DNS setup from /etc/install.inf */
- DNS::ReadNameserver (InstallInf["nameserver"]:"");
+// DNS::ReadNameserver (InstallInf["nameserver"]:"");
ProposeHostname ();
}
return true;
@@ -1946,6 +1948,7 @@
SelectHWMap(tosel);
}
/* Nothing detected -> use InstallInf */
+/*
else if(size(InstallInf) > 0) {
if(!haskey(InstallInf, "module")) {
@@ -1955,9 +1958,10 @@
NetworkModules::Alias = InstallInf["module"]:"";
NetworkModules::Options = InstallInf["options"]:"";
- type = InstallInf["type"]:"eth";
+// type = InstallInf["type"]:"eth";
device = NetworkDevices::GetFreeDevice(type);
}
+*/
else {
y2milestone("No hardware, no install.inf -> no autoinstallation possible.");
return false;
@@ -1990,7 +1994,7 @@
}
Commit();
});
- }
+ }
else
{
y2milestone ("no interface configuration, taking it from install.inf");
@@ -2002,12 +2006,12 @@
if (autoinstall_settings["routing", "routes"]:[] == [])
{
y2milestone ("gateway from install.inf");
- Routing::ReadFromGateway (InstallInf["gateway"]:"");
+// Routing::ReadFromGateway (InstallInf["gateway"]:"");
}
if (autoinstall_settings["dns", "nameservers"]:[] == [])
{
y2milestone ("nameserver from install.inf");
- DNS::ReadNameserver (InstallInf["nameserver"]:"");
+// DNS::ReadNameserver (InstallInf["nameserver"]:"");
}
if (autoinstall_settings["dns", "hostname"]:"" == "")
{
@@ -2037,7 +2041,7 @@
global define list<map> PrepareForAutoinst() {
- ReadInstallInf();
+// ReadInstallInf();
Hardware = ReadHardware("netcard");
return Hardware;
}
Modified: trunk/network/src/modules/NetworkStorage.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/NetworkStorage.ycp?rev=38154&r1=38153&r2=38154&view=diff
==============================================================================
--- trunk/network/src/modules/NetworkStorage.ycp (original)
+++ trunk/network/src/modules/NetworkStorage.ycp Mon May 28 10:20:39 2007
@@ -13,16 +13,37 @@
module "NetworkStorage";
+global string getDevice(string mount_point){
+ map out = (map)SCR::Execute(.target.bash_output, sformat("grep ' %1 ' /proc/mounts|grep -v rootfs|cut -d' ' -f1|tr -d '\n'", mount_point));
+ string device=deletechars(out["stdout"]:"", "1234567890");
+ y2internal("%1", device);
+ return device;
+}
+
+global boolean isDiskOnNetwork(string device){
+ boolean ret=false;
+ foreach(map disk, (list