Hello community,
here is the log from the commit of package yast2-network
checked in at Fri Aug 10 17:22:49 CEST 2007.
--------
--- yast2-network/yast2-network.changes 2007-08-08 15:57:04.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-network/yast2-network.changes 2007-08-10 13:25:47.000000000 +0200
@@ -1,0 +2,7 @@
+Fri Aug 10 13:20:51 CEST 2007 - mzugec@suse.cz
+
+- fixed adding new device
+- fix for bonding devices
+- 2.15.59
+
+-------------------------------------------------------------------
Old:
----
yast2-network-2.15.58.tar.bz2
New:
----
yast2-network-2.15.59.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.k24611/_old 2007-08-10 17:22:29.000000000 +0200
+++ /var/tmp/diff_new_pack.k24611/_new 2007-08-10 17:22:29.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-network (Version 2.15.58)
+# spec file for package yast2-network (Version 2.15.59)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-network
-Version: 2.15.58
+Version: 2.15.59
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-network-2.15.58.tar.bz2
+Source0: yast2-network-2.15.59.tar.bz2
prefix: /usr
# should be required by devtools
BuildRequires: perl-XML-Writer pkgconfig rpm
@@ -43,12 +43,12 @@
Conflicts: yast2-core < 2.10.6
Summary: YaST2 - Network Configuration
%package devel-doc
-Version: 2.15.58
+Version: 2.15.59
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-network-2.15.58.tar.bz2
+Source0: yast2-network-2.15.59.tar.bz2
prefix: /usr
Requires: yast2-network >= 2.15.53
Summary: YaST2 - Developer documentation for yast2-network
@@ -73,7 +73,7 @@
Michal Svec
%prep
-%setup -n yast2-network-2.15.58
+%setup -n yast2-network-2.15.59
%build
%{prefix}/bin/y2tool y2autoconf
@@ -141,6 +141,10 @@
%exclude %{prefix}/share/doc/packages/yast2-network/README
%changelog
+* Fri Aug 10 2007 - mzugec@suse.cz
+- fixed adding new device
+- fix for bonding devices
+- 2.15.59
* Wed Aug 08 2007 - mzugec@suse.cz
- fixed wlan::firmware map
- when no interfaces configured and no NM skip
++++++ yast2-network-2.15.58.tar.bz2 -> yast2-network-2.15.59.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.58/configure new/yast2-network-2.15.59/configure
--- old/yast2-network-2.15.58/configure 2007-08-08 15:19:48.000000000 +0200
+++ new/yast2-network-2.15.59/configure 2007-08-10 13:23:18.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for yast2-network 2.15.57.
+# Generated by GNU Autoconf 2.60 for yast2-network 2.15.59.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -559,8 +559,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-network'
PACKAGE_TARNAME='yast2-network'
-PACKAGE_VERSION='2.15.57'
-PACKAGE_STRING='yast2-network 2.15.57'
+PACKAGE_VERSION='2.15.59'
+PACKAGE_STRING='yast2-network 2.15.59'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1181,7 +1181,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-network 2.15.57 to adapt to many kinds of systems.
+\`configure' configures yast2-network 2.15.59 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1252,7 +1252,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-network 2.15.57:";;
+ short | recursive ) echo "Configuration of yast2-network 2.15.59:";;
esac
cat <<\_ACEOF
@@ -1330,7 +1330,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-network configure 2.15.57
+yast2-network configure 2.15.59
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1344,7 +1344,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-network $as_me 2.15.57, which was
+It was created by yast2-network $as_me 2.15.59, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -2145,7 +2145,7 @@
# Define the identity of the package.
PACKAGE='yast2-network'
- VERSION='2.15.57'
+ VERSION='2.15.59'
cat >>confdefs.h <<_ACEOF
@@ -2372,7 +2372,7 @@
-VERSION="2.15.57"
+VERSION="2.15.59"
RPMNAME="yast2-network"
MAINTAINER="Michal Zugec "
@@ -3258,7 +3258,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-network $as_me 2.15.57, which was
+This file was extended by yast2-network $as_me 2.15.59, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3301,7 +3301,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-network config.status 2.15.57
+yast2-network config.status 2.15.59
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.58/configure.in new/yast2-network-2.15.59/configure.in
--- old/yast2-network-2.15.58/configure.in 2007-08-08 15:19:44.000000000 +0200
+++ new/yast2-network-2.15.59/configure.in 2007-08-10 13:23:12.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.15.0 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-network, 2.15.57, http://bugs.opensuse.org/, yast2-network)
+AC_INIT(yast2-network, 2.15.59, http://bugs.opensuse.org/, yast2-network)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.15.57"
+VERSION="2.15.59"
RPMNAME="yast2-network"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.58/src/lan/address.ycp new/yast2-network-2.15.59/src/lan/address.ycp
--- old/yast2-network-2.15.58/src/lan/address.ycp 2007-07-17 07:38:21.000000000 +0200
+++ new/yast2-network-2.15.59/src/lan/address.ycp 2007-08-10 13:23:02.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Network card adresss configuration dialogs
* Authors: Michal Svec
*
- * $Id: address.ycp 39452 2007-07-17 05:38:38Z mzugec $
+ * $Id: address.ycp 40170 2007-08-10 11:22:46Z mzugec $
*/
{
@@ -14,15 +14,17 @@
import "Arch";
import "CWM";
import "CWMTab";
-import "NetHwDetection";
+import "Host";
import "IP";
import "Label";
import "Lan";
import "Netmask";
+import "NetHwDetection";
import "NetworkDevices";
import "Popup";
import "ProductFeatures";
import "Routing";
+import "String";
import "SuSEFirewall4Network";
import "Wizard";
import "NetworkService";
@@ -45,6 +47,8 @@
string fwzone_initial = "";
+string hostname_initial = "";
+
boolean force_static_ip = ProductFeatures::GetBooleanFeature ("network", "force_static_ip");
/**
@@ -124,6 +128,7 @@
case "static": UI::ChangeWidget(`id(`bootproto), `CurrentButton, `static);
UI::ChangeWidget(`id(`ipaddr), `Value, settings["IPADDR"]:"");
UI::ChangeWidget(`id(`netmask), `Value, settings["NETMASK"]:"");
+ UI::ChangeWidget(`id(`hostname), `Value, settings["HOSTNAME"]:"");
break;
case "dhcp" : UI::ChangeWidget(`id(`bootproto), `CurrentButton, `dynamic);
break;
@@ -174,6 +179,7 @@
case `static: settings["BOOTPROTO"]="static";
settings["IPADDR"]=(string)UI::QueryWidget(`ipaddr, `Value);
settings["NETMASK"]=(string)UI::QueryWidget(`netmask, `Value);
+ settings["HOSTNAME"]=(string)UI::QueryWidget(`hostname, `Value);
break;
default : switch ((symbol)UI::QueryWidget(`dyn, `Value)){
case `dhcp: settings["BOOTPROTO"]="dhcp";
@@ -497,7 +503,7 @@
`HSpacing(1),
`TextEntry(`id(`netmask), _("&Subnet Mask")),
`HSpacing(1),
- `TextEntry(`id(`hostname), "&Hostname - Do not use yet!"),
+ `TextEntry(`id(`hostname), "&Hostname"),
`HStretch()
)
)
@@ -561,7 +567,6 @@
*/
define any AddressDialog() {
ScreenName("lan-address");
-
string ifname = NetworkDevices::device_name (LanItems::type, LanItems::device);
string fwzone = SuSEFirewall4Network::GetZoneOfInterface (ifname);
@@ -578,6 +583,13 @@
fwzone_initial = fwzone;
+ list <string> host_list = Host::hosts[LanItems::ipaddr]:[];
+ if ( size( host_list) > 1)
+ {
+ y2milestone("More than one hostname for single IP detected, using the first one only");
+ }
+ hostname_initial = String::FirstChunk( host_list[0]:"", " \t");
+
settings = $[
// general tab:
// "IFNAME": ifname,
@@ -593,13 +605,13 @@
"NETMASK": LanItems::netmask,
"REMOTEIP": LanItems::remoteip,
+ "HOSTNAME": hostname_initial,
+
"IFCFGTYPE": LanItems::type,
"IFCFGID": LanItems::device,
];
-
-
string drvtype = DriverType (settings["IFCFGTYPE"]:"");
boolean is_ptp = drvtype == "ctc" || drvtype == "iucv";
@@ -875,9 +887,19 @@
LanItems::bootproto = settings["BOOTPROTO"]:"";
if (LanItems::bootproto == "static") // #104494
{
+ boolean ip_changed = ( LanItems::ipaddr != settings["IPADDR"]:"" );
+ if (ip_changed)
+ remove( Host::hosts, LanItems::ipaddr);
+
LanItems::ipaddr = settings["IPADDR"]:"";
LanItems::netmask = settings["NETMASK"]:"";
LanItems::remoteip = settings["REMOTEIP"]:"";
+
+ if (hostname_initial != settings["HOSTNAME"]:"" || ip_changed)
+ {
+ y2milestone("%1 %2", hostname_initial, settings["HOSTNAME"]:"");
+ Host::Update(hostname_initial, settings["HOSTNAME"]:"", [ settings["IPADDR"]:""]);
+ }
}
else
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.58/src/lan/complex.ycp new/yast2-network-2.15.59/src/lan/complex.ycp
--- old/yast2-network-2.15.58/src/lan/complex.ycp 2007-08-08 15:56:12.000000000 +0200
+++ new/yast2-network-2.15.59/src/lan/complex.ycp 2007-08-10 13:23:02.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Summary, overview and IO dialogs for network cards config
* Authors: Michal Svec
*
- * $Id: complex.ycp 40095 2007-08-08 13:56:07Z mzugec $
+ * $Id: complex.ycp 40170 2007-08-10 11:22:46Z mzugec $
*/
{
@@ -139,7 +139,8 @@
Lan::Add ();
LanItems::SelectHWMap(LanItems::getCurrentItem()["hwinfo"]:$[]);
- LanItems::SetDefaultsForHW ();
+ LanItems::operation = `edit;
+// LanItems::SetDefaultsForHW ();
/*
if (NetworkModules::Alias == "")
@@ -226,8 +227,12 @@
if (!LanItems::IsItemConfigured()) // unconfigured
UI::ChangeWidget(`id(`delete), `Enabled, false);
else UI::ChangeWidget(`id(`delete), `Enabled, true);
- if (hasAnyValue(LanItems::getCurrentItem()["hwinfo", "dev_name"]:"")) UI::ChangeWidget(`id(`edit), `Enabled, true);
+ if (!hasAnyValue(LanItems::getCurrentItem()["hwinfo", "dev_name"]:"") && size(LanItems::getCurrentItem()["hwinfo"]:$[])>0) UI::ChangeWidget(`id(`edit), `Enabled, false);
+ else UI::ChangeWidget(`id(`edit), `Enabled, true);
+/*
+ if (hasAnyValue(LanItems::getCurrentItem()["hwinfo", "dev_name"]:"") && size(LanItems::getCurrentItem()["hwinfo"]:$[])>0) UI::ChangeWidget(`id(`edit), `Enabled, true);
else UI::ChangeWidget(`id(`edit), `Enabled, false);
+*/
}
void initOverview (string key) ``{
@@ -262,8 +267,8 @@
{
switch ((symbol)event["ID"]:nil){
case `add:
- Lan::Add();
LanItems::AddNew();
+ Lan::Add();
return `add;
case `edit:
if (!LanItems::IsItemConfigured()) // unconfigured
@@ -299,18 +304,17 @@
return `edit;
case `delete:
- if (!LanItems::IsItemConfigured()) return nil;
+// if (!LanItems::IsItemConfigured()) return nil;
string pop = sformat(_("All additional addresses belonging to the interface %1
will be deleted as well.
Really continue?
-"), LanItems::current);
+"), LanItems::getCurrentItem()["ifcfg"]:"");
if(LanItems::InterfaceHasAliases() && Popup::YesNoHeadline(Label::WarningMsg(), pop) != true)
break;
LanItems::DeleteItem();
-// LanItems::Commit();
initOverview("");
break;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.58/src/lan/hardware.ycp new/yast2-network-2.15.59/src/lan/hardware.ycp
--- old/yast2-network-2.15.58/src/lan/hardware.ycp 2007-08-06 17:49:49.000000000 +0200
+++ new/yast2-network-2.15.59/src/lan/hardware.ycp 2007-08-10 13:23:02.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Hardware dialogs
* Authors: Michal Svec
*
- * $Id: hardware.ycp 40026 2007-08-06 15:37:14Z mzugec $
+ * $Id: hardware.ycp 40170 2007-08-10 11:22:46Z mzugec $
*/
{
@@ -79,14 +79,15 @@
hardware["type"] = "eth";
}
hardware["realtype"] = NetworkDevices::RealType(hardware["type"]:"", hardware["hotplug"]:"");
- hardware["device"] = LanItems::device;
+ if (hasAnyValue(NetworkDevices::Name)) hardware["device"] = NetworkDevices::device_num(NetworkDevices::Name);
+ else hardware["device"] = LanItems::device;
hardware["default_device"] = LanItems::device;
// #38213, remember device id when we switch back from pcmcia/usb
hardware["non_hotplug_device_id"] = hardware["device"]:"";
+/*
hardware["hwcfg"] = LanItems::nm_name;
if (!hasAnyValue(LanItems::nm_name) && hasAnyValue(LanItems::nm_name_old)) hardware["hwcfg"]=LanItems::nm_name_old;
-y2internal("hwcfg %1", hardware["hwcfg"]:"");
-
+*/
// FIXME duplicated in address.ycp
hardware["device_types"] = [ "arc", "bnep", "dummy", "eth", "fddi", "myri", "tr", "usb", "wlan", "bond" ];
@@ -360,6 +361,7 @@
if(UI::WidgetExists(`id(`dev))) {
hardware["type"] = (string) UI::QueryWidget(`id(`dev), `Value);
hardware["realtype"] = NetworkDevices::RealType(hardware["type"]:"", hardware["hotplug"]:"");
+ UI::ChangeWidget (`id (`num), `Items, LanItems::FreeDevices(hardware["realtype"]:""));
}
y2debug("type=%1", hardware["type"]:"");
y2debug("realtype=%1", hardware["realtype"]:"");
@@ -429,6 +431,20 @@
}
void storeHW (string key, map event) {
+if (LanItems::operation==`add){
+ LanItems::type = (string) UI::QueryWidget(`id(`dev), `Value);
+ string nm = (string) UI::QueryWidget(`id(`num), `Value);
+ string name=NetworkDevices::device_name(LanItems::type, nm);
+// if( hardware["device"]:"" != LanItems::device ) {
+ if(contains(NetworkDevices::List(""), name)) {
+ Popup::Error(sformat(_("Configuration name %1 (%2) already exists.
+Choose a different one."), nm, NetworkDevices::device_name(hardware["type"]:"", nm)));
+ UI::SetFocus(`id(`num));
+ }
+// }
+ NetworkDevices::Name = name;
+ LanItems::Items[LanItems::current]= $["ifcfg":name];
+}
/*
if(!(boolean)UI::QueryWidget(`enable_hwcfg, `Value))
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.58/src/lan/help.ycp new/yast2-network-2.15.59/src/lan/help.ycp
--- old/yast2-network-2.15.58/src/lan/help.ycp 2007-07-25 17:20:52.000000000 +0200
+++ new/yast2-network-2.15.59/src/lan/help.ycp 2007-08-10 13:22:05.000000000 +0200
@@ -159,7 +159,8 @@
/* Address dialog help 6/8 */
"netmask":
_("<p>For <b>Static Address Setup</b> enter static IP address (e.g., 192.168.100.99)
-for your computer and the network mask (usually 255.255.255.0)</p>")
+for your computer and the network mask (usually 255.255.255.0). Optionally, you can enter
+fully qualified hostname for this IP address. It will be written to <i>/etc/hosts</i>.</p>")
+
/* Address dialog help 8/8 */
_("<p>Contact your <b>network administrator</b> for more information about
@@ -190,7 +191,7 @@
or define your own one.</p>"),
"bondslave":
-_("<p>Select the slave devices for the bond device. Only the devices which's Device Activation is Never and set as None Address Setup are available.</p>"),
+_("<p>Select the slave devices for the bond device. Only the devices whose Device Activation is set to Never and have No Address Setup are available.</p>"),
"dhclient_help" :
/* DHCP dialog help 1/8 */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.58/src/modules/LanItems.ycp new/yast2-network-2.15.59/src/modules/LanItems.ycp
--- old/yast2-network-2.15.58/src/modules/LanItems.ycp 2007-08-06 17:49:48.000000000 +0200
+++ new/yast2-network-2.15.59/src/modules/LanItems.ycp 2007-08-10 12:57:40.000000000 +0200
@@ -38,6 +38,8 @@
global string description = "";
+
+//unique - only for backward compatibility
global string unique = "";
global string type = "";
@@ -173,6 +175,11 @@
modified = false;
}
+global void AddNew(){
+ current = size(Items)+1;
+ operation = `add;
+}
+
/*
* return list of available modules for current device
@@ -198,9 +205,8 @@
});
}
+// temporary used for reading configurations without hwinfo
global void ReadNetworkModules(){
-// NetworkModules::Read();
-//y2internal("NetworkModules::ListM %1", NetworkModules::ListM(""));
}
global void ReadNetworkInterfaces(){
@@ -226,6 +232,25 @@
// Items[pos, "hwcfg"] = val[sformat("HWD_INTERFACE_%1", tointeger(val["HWD_INTERFACE_N"]:"0")-1)]:"";
Items[pos, "ifcfg"] = confname;
});
+
+ // add to items also virtual devices (configurations) without hwinfo
+ foreach(string dev_name, map tmp_map, NetworkDevices::FilterDevices("netcard"), {
+ foreach(string dev_num, (list<string>)Map::Keys(tmp_map), {
+ boolean already = false;
+ foreach(integer key, (list<integer>)Map::Keys(Items), {
+ if (NetworkDevices::device_name(dev_name, dev_num) == Items[key, "ifcfg"]:""){
+ already = true;
+ break;
+ };
+ });
+ if (!already){
+ AddNew();
+ Items[current] = $["ifcfg":NetworkDevices::device_name(dev_name, dev_num)];
+ }
+ });
+ });
+
+
y2milestone("LanItems::Items %1", Items);
}
@@ -268,8 +293,9 @@
if (hasAnyValue(Items[key, "ifcfg"]:"") ){
NetworkDevices::Select(Items[key, "ifcfg"]:"");
-// type = NetworkDevices::device_type(NetworkDevices::Name);
type = Items[key, "hwinfo", "type"]:"";
+ if (!hasAnyValue(type)) type = NetworkDevices::device_type(Items[key, "ifcfg"]:"");
+ descr = CheckEmptyName (type, "");
string dev = NetworkDevices::device_name(type, NetworkDevices::Name);
ip = DeviceProtocol(NetworkDevices::Current);
string status = DeviceStatus(type, NetworkDevices::device_num(NetworkDevices::Name), NetworkDevices::Current);
@@ -313,7 +339,6 @@
bullets = bullets + [_("Bond slaves")+ " : " + slaves];
*/
}
-y2internal("%1\n%2", type, NetworkDevices::Current);
if (type == "wlan" &&
!(NetworkDevices::Current["WIRELESS_AUTH_MODE"]:"" != "open") &&
!hasAnyValue(NetworkDevices::Current["WIRELESS_KEY_0"]:""))
@@ -340,7 +365,7 @@
rich = " " + conn + "<br>" + mac_dev;
rich = HTML::Bold ( descr ) + rich;
- if (!hasAnyValue(Items[key, "hwinfo", "dev_name"]:""))
+ if (!hasAnyValue(Items[key, "hwinfo", "dev_name"]:"") && size(Items[key, "hwinfo"]:$[])>0)
rich = rich + _("<p>Unable to configure network card because kernel device is not present</p>");
else if (hasAnyValue(Items[key, "ifcfg"]:"") ) rich = rich + HTML::List (bullets);
else rich = rich + _("<P><UL><LI>The device is not configured</LI><LI>Press <B>Configure0) ret = true;
+ if (size(getCurrentItem()["ifcfg"]:"")>0) ret = true;
+ y2milestone("is item %1 configured? %2", current, ret);
return ret;
}
@@ -376,10 +406,6 @@
}
-global map getCurrentItem(){
- return Items[current]:$[];
-}
-
/**
* Check if the given device has any virtual alias.
* @param dev device to be checked
@@ -400,9 +426,9 @@
/* common stuff */
description = sel["name"]:"";
type = sel["type"]:"eth";
+y2internal("type %1", type);
hotplug = sel["hotplug"]:"";
- unique = sel["udi"]:"";
Requires = sel["requires"]:[];
// #44977: Requires now contain the appropriate kernel packages
// but they are handled differently due to multiple kernel flavors
@@ -726,7 +752,7 @@
devmap["STARTMODE"] = product_startmode;
}
- type = LanItems::Items[LanItems::current, "hwinfo", "type"]:"eth";
+ type = Items[current, "hwinfo", "type"]:"eth";
// type = "eth0";
device = NetworkDevices::GetFreeDevice(type);
@@ -735,7 +761,8 @@
// nm_name = NetworkModules::GetFreeName("static-");
NetworkDevices::Name = GetItemUdev()[1]:"";
- LanItems::Items[LanItems::current, "ifcfg"] = NetworkDevices::Name;
+ if (size(Items) newdev = $[];
@@ -857,7 +882,6 @@
newdev["BOOTPROTO"] = bootproto;
newdev["NAME"] = description;
}
-
// if(unique != "" && unique != nil) newdev["udi"] = unique;
/*
if(hotplug == "") {
@@ -1008,16 +1032,15 @@
newdev["_aliases"] = aliases;
y2milestone("aliases %1", aliases);
}
-
- NetworkDevices::Name = interfacename;
+ NetworkDevices::Name = Items[current, "ifcfg"]:"";
NetworkDevices::Current = newdev;
- if (NetworkDevices::Commit()) Items[current, "ifcfg"]=interfacename;
+ if (!NetworkDevices::Commit()) Items[current, "ifcfg"]="";
}
else {
y2error("Unknown operation: %1", operation);
return false;
}
- nm_name_old = nil;
+// nm_name_old = nil;
modified = true;
operation = nil;
return true;
@@ -1235,12 +1258,13 @@
global void SetItem(){
operation = `edit;
- interfacename = Items[current, "ifcfg"]:"";
- NetworkDevices::Edit(Items[current, "ifcfg"]:"");
+ interfacename = getCurrentItem()["ifcfg"]:"";
+ NetworkDevices::Edit(getCurrentItem()["ifcfg"]:"");
map devmap = NetworkDevices::Current;
type = Items[current, "hwinfo", "type"]:"";
- device = NetworkDevices::device_num(Items[current, "ifcfg"]:"");
- alias = NetworkDevices::alias_num(Items[current, "ifcfg"]:"");
+ if (!hasAnyValue(type)) type = NetworkDevices::device_type(getCurrentItem()["ifcfg"]:"");
+ device = NetworkDevices::device_num(getCurrentItem()["ifcfg"]:"");
+ alias = NetworkDevices::alias_num(getCurrentItem()["ifcfg"]:"");
// nm_name = Items[current, "hwcfg"]:"";
// if (nm_name=="") nm_name_old = createHwcfgName(Items[current, "hwinfo"]:$[], type);
// NetworkModules::SelectM(nm_name);
@@ -1248,7 +1272,6 @@
/* general stuff */
description = BuildDescription (type, device, devmap, Hardware);
- unique = devmap["udi"]:"";
SetDeviceVars(devmap, SysconfigDefaults);
@@ -1294,11 +1317,6 @@
}
-global void AddNew(){
- y2internal("Name %1", NetworkDevices::Name);
- current = size(Items)+1;
-}
-
global boolean ProposeItemConfiguration(){
y2milestone("Propose configuration for %1", getCurrentItem());
operation = nil;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.58/src/modules/Lan.ycp new/yast2-network-2.15.59/src/modules/Lan.ycp
--- old/yast2-network-2.15.58/src/modules/Lan.ycp 2007-08-08 15:56:12.000000000 +0200
+++ new/yast2-network-2.15.59/src/modules/Lan.ycp 2007-08-10 13:23:02.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Network card data
* Authors: Michal Svec
*
- * $Id: Lan.ycp 40095 2007-08-08 13:56:07Z mzugec $
+ * $Id: Lan.ycp 40170 2007-08-10 11:22:46Z mzugec $
*
* Representation of the configuration of network cards.
* Input and output routines.
@@ -584,10 +584,10 @@
* @return true if success
*/
global define boolean Add() {
- LanItems::operation = nil;
+// LanItems::operation = nil;
if(LanItems::Select("") != true) return false;
NetworkDevices::Add();
- LanItems::operation = `add;
+// LanItems::AddNew();
return true;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.58/VERSION new/yast2-network-2.15.59/VERSION
--- old/yast2-network-2.15.58/VERSION 2007-08-08 15:28:13.000000000 +0200
+++ new/yast2-network-2.15.59/VERSION 2007-08-10 13:18:39.000000000 +0200
@@ -1 +1 @@
-2.15.58
+2.15.59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org