Hello community,
here is the log from the commit of package yast2-network
checked in at Wed Jul 18 22:51:47 CEST 2007.
--------
--- yast2-network/yast2-network.changes 2007-07-17 07:39:27.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-network/yast2-network.changes 2007-07-18 15:23:40.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Jul 18 14:50:48 CEST 2007 - mzugec@suse.cz
+
+- disallow to configure card without kernel device
+- copy udev rules for persistent names on installed system
+- 2.15.49
+
+-------------------------------------------------------------------
Old:
----
yast2-network-2.15.48.tar.bz2
New:
----
yast2-network-2.15.49.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.V24773/_old 2007-07-18 22:49:35.000000000 +0200
+++ /var/tmp/diff_new_pack.V24773/_new 2007-07-18 22:49:35.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-network (Version 2.15.48)
+# spec file for package yast2-network (Version 2.15.49)
#
# 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.48
+Version: 2.15.49
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-network-2.15.48.tar.bz2
+Source0: yast2-network-2.15.49.tar.bz2
prefix: /usr
# should be required by devtools
BuildRequires: perl-XML-Writer pkgconfig rpm
@@ -53,7 +53,7 @@
Michal Svec
%prep
-%setup -n yast2-network-2.15.48
+%setup -n yast2-network-2.15.49
%build
%{prefix}/bin/y2tool y2autoconf
@@ -110,6 +110,10 @@
/usr/share/YaST2/schema/autoyast/rnc/proxy.rnc
%changelog
+* Wed Jul 18 2007 - mzugec@suse.cz
+- disallow to configure card without kernel device
+- copy udev rules for persistent names on installed system
+- 2.15.49
* Tue Jul 17 2007 - mzugec@suse.de
- no more hwcfg files, don't use getcfg (#292085)
- 2.15.48
++++++ yast2-network-2.15.48.tar.bz2 -> yast2-network-2.15.49.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.48/configure new/yast2-network-2.15.49/configure
--- old/yast2-network-2.15.48/configure 2007-07-17 07:28:22.000000000 +0200
+++ new/yast2-network-2.15.49/configure 2007-07-18 14:49:25.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.47.
+# Generated by GNU Autoconf 2.60 for yast2-network 2.15.48.
#
# 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.47'
-PACKAGE_STRING='yast2-network 2.15.47'
+PACKAGE_VERSION='2.15.48'
+PACKAGE_STRING='yast2-network 2.15.48'
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.47 to adapt to many kinds of systems.
+\`configure' configures yast2-network 2.15.48 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.47:";;
+ short | recursive ) echo "Configuration of yast2-network 2.15.48:";;
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.47
+yast2-network configure 2.15.48
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.47, which was
+It was created by yast2-network $as_me 2.15.48, 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.47'
+ VERSION='2.15.48'
cat >>confdefs.h <<_ACEOF
@@ -2372,7 +2372,7 @@
-VERSION="2.15.47"
+VERSION="2.15.48"
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.47, which was
+This file was extended by yast2-network $as_me 2.15.48, 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.47
+yast2-network config.status 2.15.48
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.48/configure.in new/yast2-network-2.15.49/configure.in
--- old/yast2-network-2.15.48/configure.in 2007-07-17 07:28:17.000000000 +0200
+++ new/yast2-network-2.15.49/configure.in 2007-07-18 14:49:21.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.47, http://bugs.opensuse.org/, yast2-network)
+AC_INIT(yast2-network, 2.15.48, 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.47"
+VERSION="2.15.48"
RPMNAME="yast2-network"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.48/src/clients/save_network.ycp new/yast2-network-2.15.49/src/clients/save_network.ycp
--- old/yast2-network-2.15.48/src/clients/save_network.ycp 2007-07-17 07:25:58.000000000 +0200
+++ new/yast2-network-2.15.49/src/clients/save_network.ycp 2007-07-18 15:14:54.000000000 +0200
@@ -355,6 +355,13 @@
"/var/lib/dhcpcd",
String::Quote (Installation::destdir)));
+ // --------------------------------------------------------------
+ // Copy udev rules for persistent names
+ WFM::Execute (.local.bash, sformat (
+ "mkdir -p '%2%1'; /bin/cp -p %1/70-net_persistent_names.rules '%2%1'",
+ "/etc/udev/rules.d",
+ String::Quote (Installation::destdir)));
+
// close and chroot back
WFM::SCRClose (new_SCR);
WFM::SCRSetDefault (old_SCR);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.48/src/modules/LanItems.ycp new/yast2-network-2.15.49/src/modules/LanItems.ycp
--- old/yast2-network-2.15.48/src/modules/LanItems.ycp 2007-07-16 16:48:27.000000000 +0200
+++ new/yast2-network-2.15.49/src/modules/LanItems.ycp 2007-07-18 14:38:03.000000000 +0200
@@ -206,7 +206,6 @@
NetworkDevices::CleanHotplugSymlink();
foreach(string tmpdevname, (list<string>)Map::Keys(NetworkDevices::FilterDevices("netcard")["eth"]:$[]), {
string confname = NetworkDevices::device_name("eth", tmpdevname);
-y2internal("confname %1", confname);
// map config = getcfg(confname, "");
integer pos = nil;
@@ -225,11 +224,13 @@
// Items[pos, "hwcfg"] = val[sformat("HWD_INTERFACE_%1", tointeger(val["HWD_INTERFACE_N"]:"0")-1)]:"";
Items[pos, "ifcfg"] = confname;
});
+ y2milestone("LanItems::Items %1", Items);
}
list GetDescr(){
list descr = [];
foreach(integer key, map value, (map >)Items, {
+
if ( haskey(value, "table_descr") && size(Items[key, "table_descr"]:$[])>1)
descr = add(descr, $["id":key,
"rich_descr":Items[key, "table_descr", "rich_descr"]:"",
@@ -239,50 +240,110 @@
return descr;
}
-/**
- * Create an overview table with all configured devices
- * @return table items
- */
-global list Overview() {
- list unconfigured = Map::Keys(Items);
+void BuildLanOverview() {
+ map startmode_descrs = $[
+ // summary description of STARTMODE=auto
+ "auto": _("Started automatically at boot"),
+ // summary description of STARTMODE=hotplug
+ "hotplug": _("Started automatically at boot"),
+ // summary description of STARTMODE=ifplugd
+ "ifplugd": _("Started automatically on cable connection"),
+ // summary description of STARTMODE=managed
+ "managed": _("Managed by NetworkManager"),
+ // summary description of STARTMODE=off
+ "off" : _("Will not be started at all")
+ ];
+
- foreach( term card, (list<term>) BuildOverview("netcard", Hardware), {
- string id = card[0,0]:"";
- list desc = [ card[1]:"", card[2]:""];
foreach(integer key, (list<integer>)Map::Keys(Items), {
- if (Items[key, "ifcfg"]:"" == id && hasAnyValue(id)){
- Items[key, "table_descr"] = $[
- "rich_descr" : card[3]: (desc[1]:_("Unknown")),
- "table_descr": desc
- ];
- unconfigured = filter(integer row, (list<integer>)unconfigured, {return(row!=key);});
- }
- });
- });
+ string rich = "";
+ string ip = _("Not configured");
+ string descr = HardwareName (Hardware, Items[key, "hwinfo", "udi"]:"");
+ descr = CheckEmptyName (type, descr);
+ list <string> bullets = [];
+
+ if (hasAnyValue(Items[key, "ifcfg"]:"") ){
+ NetworkDevices::Select(Items[key, "ifcfg"]:"");
+ type = NetworkDevices::device_type(NetworkDevices::Name);
+ string dev = NetworkDevices::device_name(type, NetworkDevices::Name);
+ ip = DeviceProtocol(NetworkDevices::Current);
+
+
+
+ string startmode_descr = startmode_descrs[NetworkDevices::Current["STARTMODE"]:""]:_("Started manually");
+
+ bullets = [
+ sformat(_("Device Name: %1"), dev),
+ startmode_descr,
+ ];
+ if (NetworkDevices::Current["STARTMODE"]:"" != "managed")
+ {
+ if (ip != "NONE")
+ {
+ bullets = bullets + [
+ ip == "DHCP" ? _("IP address assigned using DHCP") :
+ sformat(_("IP address: %1, subnet mask %2")
+ , ip, NetworkDevices::Current["NETMASK"]:""),
+ ];
+ }
+ // build aliases overview
+ if (size(NetworkDevices::Current["_aliases"]:$[])>0 && !NetworkService::IsManaged()){
+ foreach(string key, map desc, (map >) NetworkDevices::Current["_aliases"]:$[], {
+ string parameters = sformat(_("IP address: %1, subnet mask %2"), desc["IPADDR"]:"", desc["NETMASK"]:"");
+ bullets = add(bullets, sformat("%1 (%2)", key, parameters) );
+ });
+ }
+ }
+
+ // build the "Bond Slaves" entry of rich box
+ if (type == "bond")
+ {
+/*
+ string slaves = "";
+ foreach (string key, any value, (map)v, {
+ if ((value != nil) && (regexpmatch(key, "BONDING_SLAVE[0-9]")))
+ slaves = slaves + ((slaves != "") ? ", " : "") + (string)value;
+ });
+ if (slaves != "")
+ bullets = bullets + [_("Bond slaves")+ " : " + slaves];
+*/
+ }
+
+ }
+ string conn = HTML::Bold ( (Items[key, "hwinfo", "link"]:false == true)?"":_("(not connected)") );
+ string mac_dev="";
+ if (hasAnyValue(Items[key, "hwinfo", "mac"]:"")) mac_dev= HTML::Bold ("MAC : ") + Items[key, "hwinfo", "mac"]:"" + "<br>";
+ else if (hasAnyValue(Items[key, "hwinfo", "busid"]:"")) mac_dev= HTML::Bold ("BusID : ") + Items[key, "hwinfo", "busid"]:"" + "<br>";
+ rich = " " + conn + "<br>" + mac_dev;
+ rich = HTML::Bold ( descr ) + rich;
+
+ if (!hasAnyValue(Items[key, "hwinfo", "dev_name"]:""))
+ 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>Configure to configure</LI></UL></P>");
+
- list unconf_hwinfo=[];
- foreach(integer row, (list<integer>)unconfigured, {
- unconf_hwinfo = add(unconf_hwinfo, Items[row, "hwinfo"]:$[]);
- });
- list