Author: mzugec
Date: Thu Jan 14 17:45:43 2010
New Revision: 60378
URL: http://svn.opensuse.org/viewcvs/yast?rev=60378&view=rev
Log:
support for BOOTPROTO=ibft option (bnc#551380)
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/Lan.ycp
branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanItems.ycp
branches/SuSE-Code-11-SP1-Branch/network/yast2-network.spec.in
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=60378&r1=60377&r2=60378&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/VERSION (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/VERSION Thu Jan 14 17:45:43 2010
@@ -1 +1 @@
-2.17.115
+2.17.116
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=60378&r1=60377&r2=60378&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 Jan 14 17:45:43 2010
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Jan 14 17:44:36 CET 2010 - mzugec@suse.cz
+
+- support for BOOTPROTO=ibft option (bnc#551380)
+- 2.17.116
+
+-------------------------------------------------------------------
Wed Dec 9 13:54:27 CET 2009 - mzugec@suse.de
- disable IPv6 (bnc#561611)
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=60378&r1=60377&r2=60378&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 Jan 14 17:45:43 2010
@@ -31,7 +31,7 @@
map InstallInf = $[];
// global variable because chrooted environment
-boolean network_disk=false;
+integer network_disk=0;
/**
* Read one install.inf item
@@ -206,34 +206,61 @@
}
-map hwcfg=$[];
+//map hwcfg=$[];
+list<map> hardware=ReadHardware("netcard");
+y2milestone("hardware %1", hardware);
+
+
void CreateIfcfg(){
string network_configuration="";
- // set BOOTPROTO=[ static | dhcp ]
- if (InstallInf["bootproto"]:"dhcp"=="static")
- {
- // add broadcast interface #suse49131
- network_configuration=sformat("BOOTPROTO='static'\nIPADDR='%1/%2'\nBROADCAST='%3'\n",
- InstallInf["ipaddr"]:"", Netmask::ToBits(InstallInf["netmask"]:""), InstallInf["bcast"]:"");
- if(size(InstallInf["ipaddr6"]:"")>0){
- network_configuration=sformat("%1\n%2", network_configuration,
- sformat("LABEL_ipv6='ipv6'\nIPADDR_ipv6='%1'\n", InstallInf["ipaddr6"]:"")
- );
- }
- }
- else
- {
- //DHCP (also for IPv6) setup
- if (InstallInf["bootproto"]:""=="dhcp") network_configuration="BOOTPROTO='dhcp4'\n";
- else if (InstallInf["bootproto"]:""=="dhcp6") network_configuration="BOOTPROTO='dhcp6'\n";
- else if (InstallInf["bootproto"]:""=="dhcp,dhcp6") network_configuration="BOOTPROTO='dhcp'\n";
-
- // set DHCP_SET_HOSTNAME=yes #suse30528
- y2milestone("set DHCLIENT_SET_HOSTNAME=yes on installed system");
- SCR::Execute(.target.bash_output, "sed -i s/\"DHCLIENT_SET_HOSTNAME=.*\"/'DHCLIENT_SET_HOSTNAME=\"yes\"'/g /etc/sysconfig/network/dhcp");
+
+ if (network_disk==1 && contains(NetworkStorage::getiBFTDevices(), InstallInf["netdevice"]:"")){
+ network_configuration = sformat("%1STARTMODE='nfsroot'\nBOOTPROTO='ibft'\n", network_configuration);
+ } else {
+
+ // set BOOTPROTO=[ static | dhcp ]
+ if (InstallInf["bootproto"]:"dhcp"=="static")
+ {
+ // add broadcast interface #suse49131
+ network_configuration=sformat("BOOTPROTO='static'\nIPADDR='%1/%2'\nBROADCAST='%3'\n",
+ InstallInf["ipaddr"]:"", Netmask::ToBits(InstallInf["netmask"]:""), InstallInf["bcast"]:"");
+ if(size(InstallInf["ipaddr6"]:"")>0){
+ network_configuration=sformat("%1\n%2", network_configuration,
+ sformat("LABEL_ipv6='ipv6'\nIPADDR_ipv6='%1'\n", InstallInf["ipaddr6"]:"")
+ );
+ }
+ }
+ else
+ {
+ //DHCP (also for IPv6) setup
+ if (InstallInf["bootproto"]:""=="dhcp") network_configuration="BOOTPROTO='dhcp4'\n";
+ else if (InstallInf["bootproto"]:""=="dhcp6") network_configuration="BOOTPROTO='dhcp6'\n";
+ else if (InstallInf["bootproto"]:""=="dhcp,dhcp6") network_configuration="BOOTPROTO='dhcp'\n";
+
+ // set DHCP_SET_HOSTNAME=yes #suse30528
+ y2milestone("set DHCLIENT_SET_HOSTNAME=yes on installed system");
+ SCR::Execute(.target.bash_output, "sed -i s/\"DHCLIENT_SET_HOSTNAME=.*\"/'DHCLIENT_SET_HOSTNAME=\"yes\"'/g /etc/sysconfig/network/dhcp");
+ }
+
+ switch(network_disk)
+ {
+ case 0:
+ network_configuration = sformat("%1STARTMODE='onboot'\n", network_configuration);
+ break;
+ case 1:
+ if (!contains(NetworkStorage::getiBFTDevices(), InstallInf["netdevice"]:"")){
+ network_configuration = sformat("%1STARTMODE='nfsroot'\n", network_configuration);
+ }
+ break;
+ case 2:
+ network_configuration = sformat("%1STARTMODE='nfsroot'\n", network_configuration);
+ break;
+ }
+
}
+
// wireless devices (bnc#223570)
if ( size(InstallInf["WESSID"]:"")>0 )
{
@@ -274,25 +301,11 @@
network_configuration = sformat("%1LLADDR='%2'\n", network_configuration, InstallInf["hwaddr"]:"");
- if (network_disk)
- {
- network_configuration = sformat("%1STARTMODE='nfsroot'\n", network_configuration);
- }
- else
- {
- network_configuration = sformat("%1STARTMODE='onboot'\n", network_configuration);
- }
-
- // reference to hardware configuration
- // network_configuration = sformat("%1_nm_name='%2'\n", network_configuration, hwcfg);
// point to point interface
if (size(InstallInf["remote_ip"]:"")>0)
network_configuration = sformat("%1REMOTE_IPADDR='%2'\n", network_configuration, InstallInf["remote_ip"]:"");
- list<map> hardware=ReadHardware("netcard");
- y2milestone("hardware %1", hardware);
-
string ifcfg = sformat("ifcfg-%1", InstallInf["netdevice"]:"");
string hw_name = BuildDescription(NetworkInterfaces::device_type(InstallInf["netdevice"]:""), NetworkInterfaces::device_num(ifcfg), $["dev_name":InstallInf["netdevice"]:""], hardware);
Modified: branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp?rev=60378&r1=60377&r2=60378&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp Thu Jan 14 17:45:43 2010
@@ -26,7 +26,7 @@
import "NetworkConfig";
import "NetworkInterfaces";
import "NetworkService";
-import "NetworkStorage";
+//import "NetworkStorage";
import "Package";
import "ProductFeatures";
import "Routing";
Modified: branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanItems.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanItems.ycp?rev=60378&r1=60377&r2=60378&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanItems.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/src/modules/LanItems.ycp Thu Jan 14 17:45:43 2010
@@ -1578,7 +1578,7 @@
netmask = "";
bootproto = "dhcp";
// #176804
- if (NetworkStorage::isDiskOnNetwork ( NetworkStorage::getDevice("/") ))
+ if (NetworkStorage::isDiskOnNetwork ( NetworkStorage::getDevice("/") )>0)
{
startmode = "nfsroot";
y2milestone ("startmode nfsroot");
Modified: branches/SuSE-Code-11-SP1-Branch/network/yast2-network.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/yast2-network.spec.in?rev=60378&r1=60377&r2=60378&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/yast2-network.spec.in (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/yast2-network.spec.in Thu Jan 14 17:45:43 2010
@@ -7,10 +7,11 @@
BuildRequires: yast2-devtools yast2-testsuite
BuildRequires: yast2-country
BuildRequires: yast2-installation >= 2.15.27
-BuildRequires: yast2 >= 2.16.6
+# NetworkStorage: adapt functions needed for iBFT (bnc#551380)
+BuildRequires: yast2 >= 2.17.82
-# needed for prefixlen support in aliases
-Requires: yast2 >= 2.17.5
+# NetworkStorage: adapt functions needed for iBFT (bnc#551380)
+Requires: yast2 >= 2.17.82
#netconfig (FaTE #303618)
Requires: sysconfig >= 0.71.2
#GetLanguageCountry
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org