Author: mzugec
Date: Thu Jan 14 18:00:25 2010
New Revision: 60383
URL: http://svn.opensuse.org/viewcvs/yast?rev=60383&view=rev
Log:
support for BOOTPROTO=ibft option (bnc#551380)
Modified:
trunk/network/VERSION
trunk/network/package/yast2-network.changes
trunk/network/src/clients/save_network.ycp
trunk/network/src/modules/Lan.ycp
trunk/network/src/modules/LanItems.ycp
trunk/network/yast2-network.spec.in
Modified: trunk/network/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/VERSION?rev=60383&r1=60382&r2=60383&view=diff
==============================================================================
--- trunk/network/VERSION (original)
+++ trunk/network/VERSION Thu Jan 14 18:00:25 2010
@@ -1 +1 @@
-2.19.5
+2.19.6
Modified: trunk/network/package/yast2-network.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/package/yast2-network.changes?rev=60383&r1=60382&r2=60383&view=diff
==============================================================================
--- trunk/network/package/yast2-network.changes (original)
+++ trunk/network/package/yast2-network.changes Thu Jan 14 18:00:25 2010
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Thu Jan 14 17:59:48 CET 2010 - mzugec@suse.cz
+
+- support for BOOTPROTO=ibft option (bnc#551380)
+- 2.19.6
+
------------------------------------------------------------------
Wed Jan 13 18:56:03 CET 2010 - kmachalkova@suse.cz
Modified: trunk/network/src/clients/save_network.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/clients/save_network.ycp?rev=60383&r1=60382&r2=60383&view=diff
==============================================================================
--- trunk/network/src/clients/save_network.ycp (original)
+++ trunk/network/src/clients/save_network.ycp Thu Jan 14 18:00:25 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='auto'\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);
@@ -411,7 +424,7 @@
y2milestone("Copy %1 into %2", copy_from, copy_to);
string cmd = sformat("cp %1 %2", copy_from, copy_to);
y2internal("cml %1:%2", cmd, SCR::Execute(.target.bash_output, cmd));
- });
+ });
// merge files with default installed by sysconfig
foreach(string file, ["dhcp", "config"], {
Modified: trunk/network/src/modules/Lan.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/Lan.ycp?rev=60383&r1=60382&r2=60383&view=diff
==============================================================================
--- trunk/network/src/modules/Lan.ycp (original)
+++ trunk/network/src/modules/Lan.ycp Thu Jan 14 18:00:25 2010
@@ -26,7 +26,7 @@
import "NetworkConfig";
import "NetworkInterfaces";
import "NetworkService";
-import "NetworkStorage";
+//import "NetworkStorage";
import "Package";
import "ProductFeatures";
import "Routing";
Modified: trunk/network/src/modules/LanItems.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/LanItems.ycp?rev=60383&r1=60382&r2=60383&view=diff
==============================================================================
--- trunk/network/src/modules/LanItems.ycp (original)
+++ trunk/network/src/modules/LanItems.ycp Thu Jan 14 18:00:25 2010
@@ -1384,7 +1384,7 @@
netmask = "";
bootproto = "dhcp";
// #176804
- if (NetworkStorage::isDiskOnNetwork ( NetworkStorage::getDevice("/") ))
+ if (NetworkStorage::isDiskOnNetwork ( NetworkStorage::getDevice("/") )>0)
{
startmode = "nfsroot";
y2milestone ("startmode nfsroot");
Modified: trunk/network/yast2-network.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/yast2-network.spec.in?rev=60383&r1=60382&r2=60383&view=diff
==============================================================================
--- trunk/network/yast2-network.spec.in (original)
+++ trunk/network/yast2-network.spec.in Thu Jan 14 18:00:25 2010
@@ -9,10 +9,10 @@
BuildRequires: yast2-devtools yast2-testsuite
BuildRequires: yast2-country
BuildRequires: yast2-installation >= 2.15.27
-BuildRequires: yast2 >= 2.16.6
-# ProductControl::Disable* - yast2-2.18.23
-Requires: yast2 >= 2.18.23
+# NetworkStorage: adapt functions needed for iBFT (bnc#551380)
+BuildRequires: yast2 >= 2.19.3
+Requires: yast2 >= 2.19.3
#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