Hello community,
here is the log from the commit of package yast2-network
checked in at Mon Aug 6 18:27:17 CEST 2007.
--------
--- yast2-network/yast2-network.changes 2007-07-26 14:18:14.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-network/yast2-network.changes 2007-08-06 17:54:46.000000000 +0200
@@ -1,0 +2,12 @@
+Mon Aug 6 17:57:37 CEST 2007 - mzugec@suse.cz
+
+- copy udev rules from inst-sys (#297616)
+- 2.15.57
+
+-------------------------------------------------------------------
+Mon Aug 6 17:40:27 CEST 2007 - mzugec@suse.cz
+
+- removed NetworkModules (no more hwcfg files)
+- 2.15.56
+
+-------------------------------------------------------------------
Old:
----
yast2-network-2.15.55.tar.bz2
New:
----
yast2-network-2.15.57.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.B27936/_old 2007-08-06 18:26:07.000000000 +0200
+++ /var/tmp/diff_new_pack.B27936/_new 2007-08-06 18:26:07.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-network (Version 2.15.55)
+# spec file for package yast2-network (Version 2.15.57)
#
# 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.55
+Version: 2.15.57
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-network-2.15.55.tar.bz2
+Source0: yast2-network-2.15.57.tar.bz2
prefix: /usr
# should be required by devtools
BuildRequires: perl-XML-Writer pkgconfig rpm
@@ -43,15 +43,15 @@
Conflicts: yast2-core < 2.10.6
Summary: YaST2 - Network Configuration
%package devel-doc
-Version: 2.15.55
+Version: 2.15.57
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-network-2.15.55.tar.bz2
+Source0: yast2-network-2.15.57.tar.bz2
prefix: /usr
Requires: yast2-network >= 2.15.53
-Summary: Developer documentation for yast2-network
+Summary: YaST2 - Developer documentation for yast2-network
%description
This package contains the YaST2 component for network configuration.
@@ -73,7 +73,7 @@
Michal Svec
%prep
-%setup -n yast2-network-2.15.55
+%setup -n yast2-network-2.15.57
%build
%{prefix}/bin/y2tool y2autoconf
@@ -141,6 +141,12 @@
%exclude %{prefix}/share/doc/packages/yast2-network/README
%changelog
+* Mon Aug 06 2007 - mzugec@suse.cz
+- copy udev rules from inst-sys (#297616)
+- 2.15.57
+* Mon Aug 06 2007 - mzugec@suse.cz
+- removed NetworkModules (no more hwcfg files)
+- 2.15.56
* Thu Jul 26 2007 - mzugec@suse.cz
- fixed edit aliases problem (#294099)
- 2.15.55
++++++ yast2-network-2.15.55.tar.bz2 -> yast2-network-2.15.57.tar.bz2 ++++++
++++ 6922 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-network-2.15.55/agents/ag_udev_persistent new/yast2-network-2.15.57/agents/ag_udev_persistent
--- old/yast2-network-2.15.55/agents/ag_udev_persistent 2007-07-02 10:24:32.000000000 +0200
+++ new/yast2-network-2.15.57/agents/ag_udev_persistent 2007-08-06 15:07:46.000000000 +0200
@@ -9,28 +9,31 @@
use strict;
-my $filename = "/etc/udev/rules.d/70-net_persistent_names.rules";
+my $filename = "/etc/udev/rules.d/70-persistent-net.rules";
my @comment = ();
sub parse_rules {
my $class = shift;
my %hash_table = ();
# you don't need it read twice
- return 1 if (keys(%hash_table));
+# return 1 if (keys(%hash_table));
if( open( FILE, "< $filename" ) ) {
while( my $line = <FILE> ) {
- # remove '\n' and speace before delimiter ','
+ # remove '\n' and space before delimiter ','
chomp($line);
$line =~ s/, /,/g;
if ( $line =~ /^#/ ) { push(@comment, $line); }
else {
- my @cols = split(",", $line);
- my (undef, undef, $device) = split(" ", $cols[3]);
- $device =~ s/\"//g;
- $hash_table{ $device } = \@cols;
+ if ($line =~ /,/ )
+ {
+ my @cols = split(",", $line);
+ my (undef, $device) = split("=", $cols[3]);
+ $device =~ s/\"//g;
+ $hash_table{ $device } = \@cols;
+ }
}
}
close(FILE);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-network-2.15.55/configure.in new/yast2-network-2.15.57/configure.in
--- old/yast2-network-2.15.55/configure.in 2007-07-26 14:14:26.000000000 +0200
+++ new/yast2-network-2.15.57/configure.in 2007-08-06 17:53:09.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-network
dnl
-dnl -- This file is generated by y2autoconf 2.15.0 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.15.1 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-network, 2.15.54, http://bugs.opensuse.org/, yast2-network)
+AC_INIT(yast2-network, 2.15.56, 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.54"
+VERSION="2.15.56"
RPMNAME="yast2-network"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-network-2.15.55/missing new/yast2-network-2.15.57/missing
--- old/yast2-network-2.15.55/missing 2007-07-26 14:14:31.000000000 +0200
+++ new/yast2-network-2.15.57/missing 2007-08-06 17:53:15.000000000 +0200
@@ -1,9 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2005-06-08.21
+scriptversion=2006-05-10.23
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 1996.
@@ -33,6 +33,8 @@
fi
run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@@ -44,7 +46,7 @@
msg="missing on your system"
-case "$1" in
+case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
@@ -77,6 +79,7 @@
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
@@ -106,7 +109,7 @@
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
-case "$1" in
+case $1 in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
@@ -135,7 +138,7 @@
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
-case "$1" in
+case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
@@ -164,7 +167,7 @@
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
- case "$f" in
+ case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@@ -192,8 +195,8 @@
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
@@ -214,25 +217,25 @@
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
- if [ ! -f y.tab.h ]; then
+ if test ! -f y.tab.h; then
echo >y.tab.h
fi
- if [ ! -f y.tab.c ]; then
+ if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
@@ -244,18 +247,18 @@
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
- if [ ! -f lex.yy.c ]; then
+ if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
@@ -267,11 +270,9 @@
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
@@ -289,11 +290,17 @@
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
@@ -317,13 +324,13 @@
fi
firstarg="$1"
if shift; then
- case "$firstarg" in
+ case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
- case "$firstarg" in
+ case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-network-2.15.55/src/clients/save_network.ycp new/yast2-network-2.15.57/src/clients/save_network.ycp
--- old/yast2-network-2.15.55/src/clients/save_network.ycp 2007-07-18 15:14:54.000000000 +0200
+++ new/yast2-network-2.15.57/src/clients/save_network.ycp 2007-08-06 17:52:24.000000000 +0200
@@ -37,10 +37,8 @@
define boolean ReadInstallInfItem(path install_inf, string item, string var) {
if(item == nil || item == "" || var == nil || var == "") return false;
string val = (string) SCR::Read(add(install_inf, var));
-//y2internal("val %1 %2", item, val);
if(val == nil) return false;
if(val != "") InstallInf[item] = val;
-//y2internal("%1", InstallInf);
return true;
}
@@ -357,6 +355,12 @@
// --------------------------------------------------------------
// Copy udev rules for persistent names
+ // workaround (#292375):
+ // delete lock files
+ WFM::Execute(.local.bash, "rm -rf /dev/.udev/.lock*; rm /dev/.udev/tmp-rules*");
+ // re-trigger event for net
+ WFM::Execute(.local.bash, "udevtrigger --subsystem-match=net");
+
WFM::Execute (.local.bash, sformat (
"mkdir -p '%2%1'; /bin/cp -p %1/70-net_persistent_names.rules '%2%1'",
"/etc/udev/rules.d",
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-network-2.15.55/src/lan/cmdline.ycp new/yast2-network-2.15.57/src/lan/cmdline.ycp
--- old/yast2-network-2.15.55/src/lan/cmdline.ycp 2007-07-24 15:12:00.000000000 +0200
+++ new/yast2-network-2.15.57/src/lan/cmdline.ycp 2007-08-06 17:41:40.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Network cards cmdline handlers
* Authors: Michal Svec
*
- * $Id: cmdline.ycp 39636 2007-07-24 13:12:11Z mzugec $
+ * $Id: cmdline.ycp 40026 2007-08-06 15:37:14Z mzugec $
*/
{
@@ -17,7 +17,6 @@
import "NetworkDevices";
import "RichText";
import "Report";
-import "NetworkModules";
import "LanItems";
import "Map";
@@ -67,6 +66,7 @@
// warn if selecting a card without a driver, #29296
// TODO also for DSL...
+/*
if (NetworkModules::Alias == "")
{
CommandLine::Print(_("The device does not have a driver module.
@@ -76,6 +76,7 @@
return false;
}
}
+*/
// this is one of 3 places to install packages :-(
// - kernel modules (InstallKernel): before loaded
// - smpppd & kinternet: before net start
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-network-2.15.55/src/lan/complex.ycp new/yast2-network-2.15.57/src/lan/complex.ycp
--- old/yast2-network-2.15.55/src/lan/complex.ycp 2007-07-25 22:24:40.000000000 +0200
+++ new/yast2-network-2.15.57/src/lan/complex.ycp 2007-08-06 17:41:40.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Summary, overview and IO dialogs for network cards config
* Authors: Michal Svec
*
- * $Id: complex.ycp 39683 2007-07-25 20:24:50Z mzugec $
+ * $Id: complex.ycp 40026 2007-08-06 15:37:14Z mzugec $
*/
{
@@ -17,7 +17,6 @@
import "DNS";
import "Mode";
import "NetworkConfig";
-import "NetworkModules";
import "NetworkService";
import "Routing";
import "Wizard";
@@ -141,9 +140,7 @@
LanItems::SelectHWMap(LanItems::getCurrentItem()["hwinfo"]:$[]);
LanItems::SetDefaultsForHW ();
-
- // warn if selecting a card without a driver, #29296
- // TODO also for DSL...
+/*
if (NetworkModules::Alias == "")
{
if (!Popup::ContinueCancel (_("The device does not have a driver module.
@@ -156,11 +153,6 @@
string fw = request_firmware[NetworkModules::Alias]:"";
if (fw != ""){
if ((!Package::Installed(fw) && !Package::Available(fw))){
-
- //check if package with the firmware is available
- //i.e. if there are any inst. sources defined
- //and if the package is available on any of them
-
Popup::Message(sformat(_("The device needs a firmware to function properly. It can be installed from
%1 Add-On CD.\nTo install the firmware, add Add-On CD to your YaST installation sources and return
to this configuration dialog."), Product::name));
@@ -174,6 +166,7 @@
once you have installed the firmware.")));
}
}
+*/
// this is one of 3 places to install packages :-(
// - kernel modules (InstallKernel): before loaded
// - smpppd & kinternet: before net start
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-network-2.15.55/src/lan/hardware.ycp new/yast2-network-2.15.57/src/lan/hardware.ycp
--- old/yast2-network-2.15.55/src/lan/hardware.ycp 2007-07-02 16:53:54.000000000 +0200
+++ new/yast2-network-2.15.57/src/lan/hardware.ycp 2007-08-06 17:41:40.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Hardware dialogs
* Authors: Michal Svec
*
- * $Id: hardware.ycp 39111 2007-07-02 14:53:49Z mzugec $
+ * $Id: hardware.ycp 40026 2007-08-06 15:37:14Z mzugec $
*/
{
@@ -15,7 +15,6 @@
import "Label";
import "Lan";
import "NetworkDevices";
-import "NetworkModules";
import "Popup";
import "Wizard";
import "LanItems";
@@ -27,8 +26,7 @@
* @return dialog result
*/
/* Manual dialog help 1/4 */
- string hw_help = _("<p>Here, set up your networking device.
-The values are written to <i>/etc/sysconfig/hardware/hwcfg-*</i>.</p>
+ string hw_help = _("<p>Here, set up your networking device.</p>
") +
/* Manual dialog help 2/4 */
@@ -69,8 +67,8 @@
void initHardware(){
hardware = $[];
- hardware["modul"] = NetworkModules::Alias; // FIXME: MOD Lan::Module["module"]:"";
- hardware["options"] = NetworkModules::Options; // FIXME: MOD Lan::Module["options"]:"";
+// hardware["modul"] = NetworkModules::Alias; // FIXME: MOD Lan::Module["module"]:"";
+// hardware["options"] = NetworkModules::Options; // FIXME: MOD Lan::Module["options"]:"";
hardware["hotplug"] = LanItems::hotplug;
y2milestone("hotplug=%1", LanItems::hotplug);
hardware["modules_from_hwinfo"] = LanItems::GetItemModules(hardware["modul"]:"" );
@@ -145,13 +143,11 @@
/* Frame label */
term KernelBox = `Frame(_("&Kernel Module"), `HBox(`HSpacing(0.5), `VBox(
`VSpacing(0.4),
- /* Text entry label */
- `TextEntry(`id(`hwcfg), _("&Hardware Configuration Name"), hardware["hwcfg"]:""),
`HBox(
/* Text entry label */
`ComboBox(`id(`modul), `opt(`editable), _("&Module Name"), hardware["modules_from_hwinfo"]:[]),
`HSpacing(0.2),
- `TextEntry(`id(`options), Label::Options (), hardware["options"]:"")
+ `TextEntry(`id(`options), `opt(`disabled), Label::Options (), hardware["options"]:"")
),
`VSpacing(0.4),
CheckBoxes,
@@ -183,42 +179,26 @@
/* Edit -> don't allow some changes */
// FIXME: devname if(true /* FIXME: devname Lan::operation == `edit */) {
- if(LanItems::operation == `edit /* FIXME: unique || Lan::unique != "" */) {
- TypeNameWidgets =
- `Left(`HSquash(`Left(`VBox(
-/*
- `HBox(
- `HWeight(1, `Right(`Label(_("Configuration Name")))),
- `HSpacing(0.5),
- `HWeight(1, `Left(`Label(`opt(`outputField), NetworkDevices::device_name(hardware["realtype"]:"", hardware["device"]:""))))
- ),
-*/
- `VSpacing(0.5),
- `HBox(
- /* Label text */
- `HWeight(1, `Right(`Label(_("Hardware Name")))),
- `HSpacing(0.5),
- `HWeight(1, `Left(`Label(`opt(`outputField), hardware["hwcfg"]:"")))
- )
- ))));
- }
- term contents =
- `VBox(
+ term UdevWidget =
`Frame(_("Udev rules"),
`HBox(
-/*
- `RadioButtonGroup(
- `VBox(
- `Left(`RadioButton(`id(0), "SYSFS{address}=='$MAC'", true)),
- `Left(`RadioButton(`id(1), "KERNELS=='$BusID'" ))
- )),
-*/
`TextEntry(`id(`udev_rule), _("Matching rule"), ""),
`TextEntry(`id(`device_name), _("Device Name"), "")
)
- ),
+ );
+
+ if(LanItems::operation == `edit ) TypeNameWidgets = `Empty();
+ else UdevWidget = `Empty();
+
+ term contents =
+ `VBox(
+ UdevWidget,
+ TypeNameWidgets,
+ KernelBox,
+ `VStretch()
+/*
`CheckBoxFrame(`id(`enable_hwcfg), caption, hardware["hwcfg"]:"" != "",
`HBox(
`HSpacing(2),
@@ -231,7 +211,6 @@
`HBox(
`HStretch(),
`HSpacing(0.5),
- /* Pushbutton label */
`PushButton(`id(`list), _("Select from &List")),
`HSpacing(0.5),
`HStretch()
@@ -241,26 +220,27 @@
`HSpacing(2),
`VStretch()
))
+*/
);
UI::ReplaceWidget(`hw_content, contents);
-if (!hasAnyValue(LanItems::nm_name) && hasAnyValue(LanItems::nm_name_old)) UI::ChangeWidget(`enable_hwcfg, `Value, false);
UI::ChangeWidget(`id(`modul), `Enabled, hardware["no_hotplug_dummy"]:false);
- UI::ChangeWidget(`id(`options), `Enabled, hardware["no_hotplug_dummy"]:false);
+// UI::ChangeWidget(`id(`options), `Enabled, hardware["no_hotplug_dummy"]:false);
ChangeWidgetIfExists(`id(`list), `Enabled, hardware["no_hotplug_dummy"]:false);
ChangeWidgetIfExists(`id(`hwcfg), `Enabled, hardware["no_hotplug"]:false);
ChangeWidgetIfExists(`id(`usb), `Enabled, (hardware["hotplug"]:"" == "usb" || hardware["hotplug"]:"" == "") && hardware["type"]:"" != "dummy");
ChangeWidgetIfExists(`id(`pcmcia), `Enabled, (hardware["hotplug"]:"" == "pcmcia" || hardware["hotplug"]:"" == "") && hardware["type"]:"" != "dummy");
UI::ChangeWidget(`id(`udev_rule), `Enabled, false);
UI::ChangeWidget(`id(`device_name), `Enabled, false);
+ UI::ChangeWidget(`id(`options), `Enabled, false);
UI::ChangeWidget(`id(`udev_rule), `Value, LanItems::GetItemUdev()[0]:"");
UI::ChangeWidget(`id(`device_name), `Value, LanItems::GetItemUdev()[1]:"");
if (!hw_standalone) ChangeWidgetIfExists(`id(`dev), `Enabled,false);
ChangeWidgetIfExists(`id(`num), `ValidChars, NetworkDevices::ValidCharsIfcfg ());
- ChangeWidgetIfExists(`id(`hwcfg), `ValidChars, NetworkModules::ValidCharsHwcfg ());
+// ChangeWidgetIfExists(`id(`hwcfg), `ValidChars, NetworkModules::ValidCharsHwcfg ());
}
@@ -350,8 +330,8 @@
map card = hwlist[selected]:$[];
LanItems::description = card["name"]:"";
- NetworkModules::Alias /* FIXME: MOD Lan::Module["module"] */ = card["module"]:"";
- NetworkModules::Options /* FIXME: MOD Lan::Module["options"] */ = card["options"]:"";
+// NetworkModules::Alias /* FIXME: MOD Lan::Module["module"] */ = card["module"]:"";
+// NetworkModules::Options /* FIXME: MOD Lan::Module["options"] */ = card["options"]:"";
}
return ret;
@@ -449,6 +429,7 @@
}
void storeHW (string key, map event) {
+/*
if(!(boolean)UI::QueryWidget(`enable_hwcfg, `Value))
{
NetworkModules::DeleteM(LanItems::nm_name);
@@ -470,7 +451,6 @@
if (LanItems::operation == `add || hardware["hwcfg"]:"" != LanItems::nm_name) {
if (contains (NetworkModules::ListM(""), hardware["hwcfg"]:"")) {
UI::SetFocus (`id (`hwcfg));
- /* Popup text */
Popup::Error(sformat(_("Hardware configuration %1 already exists.
Choose a different one."), hardware["hwcfg"]:""));
}
@@ -481,7 +461,6 @@
string nm = (string) UI::QueryWidget(`id(`num), `Value);
if(LanItems::operation == `add || (hardware["device"]:"" != LanItems::device && hardware["type"]:"" != LanItems::type)) {
if(contains(NetworkDevices::List(""), NetworkDevices::device_name(hardware["type"]:"", nm))) {
- /* Popup text */
Popup::Error(sformat(_("Configuration name %1 (%2) already exists.
Choose a different one."), nm, NetworkDevices::device_name(hardware["type"]:"", nm)));
UI::SetFocus(`id(`num));
@@ -514,6 +493,7 @@
hardware["type"] = (string) UI::QueryWidget(`id(`dev), `Value);
LanItems::type = hardware["type"]:"";
}
+*/
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-network-2.15.55/src/modules/LanItems.ycp new/yast2-network-2.15.57/src/modules/LanItems.ycp
--- old/yast2-network-2.15.55/src/modules/LanItems.ycp 2007-07-25 14:46:22.000000000 +0200
+++ new/yast2-network-2.15.57/src/modules/LanItems.ycp 2007-08-06 16:47:07.000000000 +0200
@@ -134,6 +134,7 @@
map ReadUdevRules(){
udev_rules = (map)SCR::Read(.udev_persistent);
+y2internal("read udev : %1", udev_rules);
return udev_rules;
}
@@ -198,8 +199,8 @@
}
global void ReadNetworkModules(){
- NetworkModules::Read();
-y2internal("NetworkModules::ListM %1", NetworkModules::ListM(""));
+// NetworkModules::Read();
+//y2internal("NetworkModules::ListM %1", NetworkModules::ListM(""));
}
global void ReadNetworkInterfaces(){
@@ -415,8 +416,8 @@
if(hotplug == "") {
// FIXME: MOD Module["module"] = hw["module"]:"";
// FIXME: MOD Module["options"] = hw["options"]:"";
- NetworkModules::Alias = hardware["module"]:"";
- NetworkModules::Options = hardware["options"]:"";
+// NetworkModules::Alias = hardware["module"]:"";
+// NetworkModules::Options = hardware["options"]:"";
}
else
y2milestone("HOTPLUG(%1) -> ignoring modprobe.conf", hotplug);
@@ -431,7 +432,7 @@
string busid = hardware["busid"]:"";
- nm_name = createHwcfgName(hardware, type);
+// nm_name = createHwcfgName(hardware, type);
interfacename = hardware["dev_name"]:"";
@@ -686,9 +687,13 @@
if (size(Items[current, "udev"]:[])>3)
{
udevs[0]=Items[current, "udev", 2]:"";
+/*
if (regexpmatch (Items[current, "udev", 3]:"", ".* [^ ]*\"$")) {
udevs[1]=regexpsub (Items[current, "udev", 3]:"", ".* ([^ ]*)\"$", "\\1");
}
+*/
+ if (regexpmatch (Items[current, "udev", 3]:"", ".*=[^ ]*\"$"))
+ udevs[1]=regexpsub (Items[current, "udev", 3]:"", ".*=[\"]*([^ ]*)\"$", "\\1");
}
return udevs;
}
@@ -775,17 +780,18 @@
/* kernel options */
if(hotplug == "" && alias == "" && nm_name != "") {
// FIXME: MOD SelectModule(dev);
- NetworkModules::SelectM(nm_name);
+// NetworkModules::SelectM(nm_name);
}
else {
// FIXME: MOD SelectModule("");
- NetworkModules::AddM();
+// NetworkModules::AddM();
}
- qeth_options = NetworkModules::QETH_OPTIONS;
- chan_mode = NetworkModules::CCW_CHAN_MODE;
- lcs_timeout = NetworkModules::LCS_LANCMD_TIMEOUT;
+// qeth_options = NetworkModules::QETH_OPTIONS;
+// chan_mode = NetworkModules::CCW_CHAN_MODE;
+// lcs_timeout = NetworkModules::LCS_LANCMD_TIMEOUT;
+/*
if (NetworkModules::QETH_IPA_TAKEOVER == nil ||
NetworkModules::QETH_IPA_TAKEOVER == "" ||
NetworkModules::QETH_IPA_TAKEOVER == "0")
@@ -799,6 +805,7 @@
qeth_layer2 = false;
else
qeth_layer2 = true;
+*/
/* We always have to set the MAC Address for qeth Layer2 support */
if (qeth_layer2 ) {
@@ -1206,10 +1213,12 @@
NetworkDevices::Commit();
Items[current, "ifcfg"] = "";
}
+/*
if (hasAnyValue(hwcfg)) {
NetworkModules::DeleteM(hwcfg);
Items[current, "hwcfg"] = "";
}
+*/
if (! (size(Items[current, "hwinfo"]:$[])>0) ){
map tmp_items = $[];
foreach(integer key, any value, Items, {
@@ -1232,9 +1241,9 @@
type = Items[current, "hwinfo", "type"]:"";
device = NetworkDevices::device_num(Items[current, "ifcfg"]:"");
alias = NetworkDevices::alias_num(Items[current, "ifcfg"]:"");
- nm_name = Items[current, "hwcfg"]:"";
- if (nm_name=="") nm_name_old = createHwcfgName(Items[current, "hwinfo"]:$[], type);
- NetworkModules::SelectM(nm_name);
+// nm_name = Items[current, "hwcfg"]:"";
+// if (nm_name=="") nm_name_old = createHwcfgName(Items[current, "hwinfo"]:$[], type);
+// NetworkModules::SelectM(nm_name);
/* general stuff */
description = BuildDescription (type, device, devmap, Hardware);
@@ -1252,13 +1261,14 @@
/* kernel options */
if(hotplug == "" && alias == "" && nm_name != "") {
// FIXME: MOD SelectModule(dev);
- NetworkModules::SelectM(nm_name);
+// NetworkModules::SelectM(nm_name);
}
else {
// FIXME: MOD SelectModule("");
- NetworkModules::AddM();
+// NetworkModules::AddM();
}
+/*
qeth_options = NetworkModules::QETH_OPTIONS;
chan_mode = NetworkModules::CCW_CHAN_MODE;
lcs_timeout = NetworkModules::LCS_LANCMD_TIMEOUT;
@@ -1276,7 +1286,7 @@
qeth_layer2 = false;
else
qeth_layer2 = true;
-
+*/
/* We always have to set the MAC Address for qeth Layer2 support */
if (qeth_layer2 ) {
qeth_macaddress = devmap["LLADDR"]:"00:00:00:00:00:00";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-network-2.15.55/src/modules/Lan.ycp new/yast2-network-2.15.57/src/modules/Lan.ycp
--- old/yast2-network-2.15.55/src/modules/Lan.ycp 2007-07-23 14:00:30.000000000 +0200
+++ new/yast2-network-2.15.57/src/modules/Lan.ycp 2007-08-06 17:41:40.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Network card data
* Authors: Michal Svec
*
- * $Id: Lan.ycp 39591 2007-07-23 12:00:42Z mzugec $
+ * $Id: Lan.ycp 40026 2007-08-06 15:37:14Z mzugec $
*
* Representation of the configuration of network cards.
* Input and output routines.
@@ -25,7 +25,6 @@
import "Mode";
import "NetworkConfig";
import "NetworkDevices";
-import "NetworkModules";
import "NetworkService";
import "NetworkStorage";
import "Package";
@@ -216,7 +215,6 @@
/* Progress step 2/9 */
ProgressNextStage(_("Reading /etc/modprobe.conf..."));
// FIXME: MOD // ReadModules(NetworkDevices::CardRegex["netcard"]:"");
-// NetworkModules::Read();
LanItems::ReadNetworkModules();
sleep(sl);
@@ -362,7 +360,7 @@
/* Progress step 2 */
ProgressNextStage(_("Writing /etc/modprobe.conf..."));
// FIXME: MOD WriteModules();
- NetworkModules::Write("netcard");
+// NetworkModules::Write("netcard");
sleep(sl);
if(Abort()) return false;
@@ -415,7 +413,7 @@
if(Abort()) return false;
/* Progress step 9 */
ProgressNextStage(_("Activating network services..."));
- NetworkModules::HwUp ();
+// NetworkModules::HwUp ();
NetworkService::StartStop ();
sleep(sl);
}
@@ -470,7 +468,7 @@
if (!Mode::autoinst()) {
// FIXME: MOD Modules = (map) eval(settings["modules"]:$[]);
NetworkDevices::Import("netcard", (map) settings["devices"]:$[]);
- NetworkModules::Import("netcard", (map) settings["hwcfg"]:$[]);
+// NetworkModules::Import("netcard", (map) settings["hwcfg"]:$[]);
} else {
LanItems::autoinstall_settings = settings;
}
@@ -495,7 +493,7 @@
// FIXME: MOD "modules" : Modules,
"config" : NetworkConfig::Export(),
"devices" : NetworkDevices::Export("netcard"),
- "hwcfg" : NetworkModules::Export("netcard"),
+// "hwcfg" : NetworkModules::Export("netcard"),
"routing" : Routing::Export(),
"managed" : NetworkService::IsManaged (),
"start_immediately": start_immediately,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-network-2.15.55/src/modules/NetworkModules.ycp new/yast2-network-2.15.57/src/modules/NetworkModules.ycp
--- old/yast2-network-2.15.55/src/modules/NetworkModules.ycp 2007-07-02 13:07:38.000000000 +0200
+++ new/yast2-network-2.15.57/src/modules/NetworkModules.ycp 1970-01-01 01:00:00.000000000 +0100
@@ -1,544 +0,0 @@
-/**
- * File: modules/NetworkModules.ycp
- * Package: Network configuration
- * Summary: Hardware config manipulation (/etc/sysconfig/hardware/hwcfg-*)
- * Authors: Michal Svec
- *
- * $Id: NetworkModules.ycp 28338 2006-02-23 17:11:24Z mvidner $
- *
- * The new sysconfig naming is interface (eg. eth0) vs. device
- * (eg. NE2000 card), but historically yast has called them device
- * vs. module.
- *
- * This module is a big mess because originally it was intended to
- * have similar structure to NetworkDevices, with config files
- * categorized in two levels [type, id], but now there is just one
- * level. Lots of code is just copied and unused.
- */
-
-{
-
-module "NetworkModules";
-textdomain "network";
-
-import "Arch";
-import "Map";
-import "NetworkDevices";
-import "String";
-
-/**
- * Current module identifier
- * @example eth0, eth1:blah, lo, ...
- */
-/* global */ string Name = "";
-
-/**
- * Alias means Driver here (think of modules.conf)
- */
-global string Alias = "";
-global string Options = "";
-
-/* S/390 stuff */
-global string SCRIPTUP = "";
-global string SCRIPTUP_ccw = "";
-global string SCRIPTUP_ccwgroup = "";
-global string SCRIPTDOWN = "";
-global string CCW_CHAN_IDS = "";
-global string CCW_CHAN_MODE = "";
-global string CCW_CHAN_NUM = "";
-global string QETH_OPTIONS = "";
-global string QETH_IPA_TAKEOVER = "";
-global string QETH_LAYER2_SUPPORT = "";
-global string LCS_LANCMD_TIMEOUT = "";
-
-/**
- * Current module information
- * @example $["BOOTPROTO":"dhcp", "STARTMODE":"auto"]
- */
-global map Current = $[];
-
-/**
- * Modules information
- * @see ReadModules
- */
-map Modules = $[];
-
-/**
- * Modules information
- * @see ReadModules
- */
-map OriginalModules = $[];
-
-/**
- * Deleted modules
- */
-list<string> Deleted = [];
-
-/**
- * True if modules are already read
- */
-boolean initialized = false;
-
-symbol operation = nil;
-
-global list<string> GetFreeNames(string prefix, integer num);
-global string GetFreeName(string prefix);
-
-/**
- * Read modules from files
- * @return true if sucess
- */
-global define boolean Read() {
-
- if(initialized == true) return true;
-
- Modules = $[];
-
- /* preparation */
- list<string> allfiles = SCR::Dir(.sysconfig.hardware.section);
- if(allfiles == nil) allfiles = [];
- list<string> modules = filter(string file, allfiles, {
- return !regexpmatch(file, "[~]");
- });
- y2debug("modules=%1", modules);
-
- /*
- modules = filter(string d, modules, {
- return regexpmatch(d, "[a-z][a-z-]*[0-9]*");
- });
- y2debug("modules=%1", modules);
- */
-
- /* Read modules */
- maplist(string d, modules, {
-
- if(haskey(Modules, d)) {
- y2error("module already present: %1", d);
- return;
- }
-
- string pth = ".sysconfig.hardware.value.\"" + d + "\"";
- y2debug("pth=%1", pth);
- list<string> values = SCR::Dir(topath(pth));
- y2debug("values=%1", values);
-
- map config = $[];
- maplist(string val, values, {
- string item = (string) SCR::Read(topath(pth + "." + val));
- if(item == nil) return;
- config[val] = item;
- y2debug("config=%1", config);
- });
-
- Modules[d] = config;
- });
- y2debug("Modules=%1", Modules);
-
- OriginalModules = Modules;
- initialized = true;
- return true;
-}
-
-/**
- */
-define map Filter(map modules, string devregex) {
- if(modules == nil || devregex == nil || devregex == "")
- return modules;
-
- /* FIXME: broken filtering */
- return modules;
-
- string regex = "^(" + NetworkDevices::CardRegex[devregex]:devregex + ")[^a-zA-Z].*$";
- y2debug("regex=%1", regex);
- modules = filter(string file, map devmap, modules, {
- return regexpmatch(file, regex) == true;
- });
- y2debug("modules=%1", modules);
- return modules;
-}
-
-/**
- */
-define map FilterNOT(map modules, string devregex) {
- if(modules == nil || devregex == nil || devregex == "")
- return $[];
-
- /* FIXME: broken filtering */
- return $[];
-
- string regex = "^(" + NetworkDevices::CardRegex[devregex]:devregex + ")[^a-zA-Z].*$";
- y2debug("regex=%1", regex);
- modules = filter(string file, map devmap, modules, {
- return regexpmatch(file, regex) != true;
- });
- y2debug("modules=%1", modules);
- return modules;
-}
-
-/**
- * One-way difference of two maps. Take away the identical items.
- * @param left left map
- * @param right right map
- * @return the keys of left which are not in right or whose values are
- * not equal in the two maps.
- */
-define list MapMinus (map left, map right) {
- list ret = [];
- if (left == nil)
- left = $[];
- if (right == nil)
- right = $[];
- foreach (any lkey, any lval, left, {
- if (!haskey (right, lkey) || lval != right[lkey]:nil)
- {
- ret = add (ret, lkey);
- }
- });
- return ret;
-}
-
-/**
- * Write modules to files
- * And also do hwdown before and hwup after, on changed ones (#44794)
- * @param devregex regular expression for the module type
- * @return true if success
- * @example NetworkModule::Write("eth|tr");
- */
-global define boolean Write(string devregex) {
-
- y2milestone("Writing configuration");
- y2debug("Modules=%1", Modules);
- y2debug("Deleted=%1", Deleted);
-
- map Mods = Filter(Modules, devregex);
- map OriginalMods = Filter(OriginalModules, devregex);
- y2milestone("OriginalMods=%1", OriginalMods);
- y2milestone("Mods=%1", Mods);
-
- /* Check for changes */
- if(Mods == OriginalMods) {
- y2milestone("No changes to %1 modules -> nothing to write", devregex);
- return true;
- }
-
- /* modules which have to be brought down
- because they have been deleted or changed */
- list todown = MapMinus (OriginalMods, Mods);
- foreach (string down, (list<string>)todown, {
- y2milestone ("hwdown %1", down);
- SCR::Execute (.target.bash, "/sbin/hwdown " + down);
- });
-
- /* remove deleted modules */
- y2milestone("Deleted=%1", Deleted);
- foreach(string d, Deleted, {
- // if(!haskey(OriginalMods, d)) return;
- /* delete config file */
- path p = topath(".sysconfig.hardware.section.\"" + d + "\"");
- y2debug("deleting: %1", p);
- SCR::Write(p, nil);
- });
-
- /* Modules with chmod=0600 */
- list chmod = [];
-
- /* write all modules */
- maplist(string d, map devmap, (map) Mods, {
-
- /* write sysconfig */
- string p = ".sysconfig.hardware.value.\"" + d + "\".";
-
- /* write all keys to config */
- maplist(string k, (list<string>) Map::Keys(devmap), {
- SCR::Write(topath(p + k), devmap[k]:"");
- });
- });
-
- /* Finish him */
- SCR::Write(.sysconfig.hardware, nil);
-
- /* modules which have to be brought up
- All of them, because downing a hwcfg unloads the module but
- it but it might be needed by another interface
- with an unchanged hwcfg - #136298 */
- list toup = Map::Keys (Mods);
- foreach (string up, (list<string>)toup, {
- y2milestone ("hwup %1", up);
- SCR::Execute (.target.bash, "/sbin/hwup " + up);
- });
-
- return true;
-}
-
-global boolean AddM() {
-
- Alias = "";
- Options = "";
-
- SCRIPTUP = "";
- SCRIPTUP_ccw = "";
- SCRIPTUP_ccwgroup = "";
- SCRIPTDOWN = "";
- CCW_CHAN_IDS = "";
- CCW_CHAN_MODE = "";
- CCW_CHAN_NUM = "";
- QETH_OPTIONS = "";
- QETH_IPA_TAKEOVER = "";
- QETH_LAYER2_SUPPORT = "";
- LCS_LANCMD_TIMEOUT = "";
-
- return true;
-}
-
-global boolean SelectM(string name) {
- if(name == nil || name == "" || !haskey(Modules, name)) {
- y2error("Wrong module: %1", name);
- return false;
- }
-
- Name = name;
-
- Alias = Modules[name, "MODULE"]:"";
- Options = Modules[name, "MODULE_OPTIONS"]:"";
-
- SCRIPTUP = Modules[name, "SCRIPTUP"]:"";
- SCRIPTUP_ccw = Modules[name, "SCRIPTUP_ccw"]:"";
- SCRIPTUP_ccwgroup = Modules[name, "SCRIPTUP_ccwgroup"]:"";
- SCRIPTDOWN = Modules[name, "SCRIPTDOWN"]:"";
- CCW_CHAN_IDS = Modules[name, "CCW_CHAN_IDS"]:"";
- CCW_CHAN_MODE = Modules[name, "CCW_CHAN_MODE"]:"";
- CCW_CHAN_NUM = Modules[name, "CCW_CHAN_NUM"]:"";
- QETH_OPTIONS = Modules[name, "QETH_OPTIONS"]:"";
- QETH_IPA_TAKEOVER = Modules[name, "QETH_IPA_TAKEOVER"]:"";
- QETH_LAYER2_SUPPORT = Modules[name, "QETH_LAYER2_SUPPORT"]:"";
- LCS_LANCMD_TIMEOUT = Modules[name, "LCS_LANCMD_TIMEOUT"]:"";
-
- y2milestone("Modules=%1", Modules);
- return true;
-}
-
-/**
- * Commit data to Modules[name]
- * @param name hwcfg name
- */
-global boolean ChangeM(string name) {
- if(name == nil || name == "" /* || !haskey(Modules, name) */) {
- y2error("Wrong module: %1", name);
- return false;
- }
-
- if(!haskey(Modules, name)) Modules[name] = $[];
-
- Modules[name, "MODULE"] = Alias;
- Modules[name, "MODULE_OPTIONS"] = Options;
- Modules[name, "STARTMODE"] = "auto";
-
- if(Arch::s390 ()) {
- Modules[name, "SCRIPTUP"] = SCRIPTUP;
- Modules[name, "SCRIPTUP_ccw"] = SCRIPTUP_ccw;
- Modules[name, "SCRIPTUP_ccwgroup"] = SCRIPTUP_ccwgroup;
- Modules[name, "SCRIPTDOWN"] = SCRIPTDOWN;
- Modules[name, "CCW_CHAN_IDS"] = CCW_CHAN_IDS;
- Modules[name, "CCW_CHAN_MODE"] = CCW_CHAN_MODE;
- Modules[name, "CCW_CHAN_NUM"] = CCW_CHAN_NUM;
- Modules[name, "QETH_OPTIONS"] = QETH_OPTIONS;
- Modules[name, "QETH_IPA_TAKEOVER"] = QETH_IPA_TAKEOVER;
- Modules[name, "QETH_LAYER2_SUPPORT"] = QETH_LAYER2_SUPPORT;
- Modules[name, "LCS_LANCMD_TIMEOUT"] = LCS_LANCMD_TIMEOUT;
- }
-
- y2milestone("Modules=%1", Modules);
- return true;
-}
-
-global boolean DeleteM(string name) {
- if(name == nil || name == "" || !haskey(Modules, name)) {
- y2error("Wrong module: %1", name);
- return false;
- }
- Deleted = add(Deleted, name);
- Modules = remove(Modules, name);
- y2milestone("Deleted=%1", Deleted);
- y2milestone("Modules=%1", Modules);
- return true;
-}
-
-global string GetFreeName(string prefix) {
- return GetFreeNames(prefix, 1)[0]:"";
-}
-
-global list<string> GetFreeNames(string prefix, integer num) {
- y2debug("Modules=%1", Modules);
-
- list<string> mods = (list<string>) Map::Keys(Modules);
- y2debug("mods=%1", mods);
-
- integer i = 0;
- integer count = 0;
- list<string> ret = [];
-
- /* Remaining numbered modules */
- while(count < num) {
- string ii = sformat("%1%2", prefix, i);
- if(!contains(mods, ii)) {
- ret = add(ret, ii);
- count = count + 1;
- }
- i = i + 1;
- }
-
- y2debug("Free modules=%1", ret);
- return ret;
-}
-
-global define list ListM(string devregex) {
-
- list ret = [];
-// if(devregex == "" || devregex == nil) {
- maplist(string n, map d, Modules, {
- ret[size(ret)] = n;
- });
-/* }
- else {
- string regex = "^(" + NetworkDevices::CardRegex[devregex]:devregex + ")[0-9]*$";
- maplist(string t, map d, Modules, {
- if(regexpmatch(t, regex)) {
- maplist(string n, (list<string>) Map::Keys(d), {
- ret[size(ret)] = NetworkDevices::device_name(t,n);
- });
- }
- });
- }
-*/
-
- y2debug("ret=%1", ret);
- return ret;
-}
-
-/**
- * Import data
- * @param settings settings to be imported
- * @return true on success
- */
-global define boolean Import(string devregex, map modules) {
- map Mods = FilterNOT(Modules, devregex);
- y2debug("Mods=%1", Mods);
- Modules = (map) union(Mods, modules);
- OriginalModules = nil;
- return true;
-}
-
-/**
- * Export data
- * @return dumped settings (later acceptable by Import())
- */
-global define map Export(string devregex) {
- map Mods = Filter(Modules, devregex);
- y2debug("Mods=%1", Mods);
- return (map) Mods;
-}
-
-/**
- * Were the modules changed?
- * @return true if modified
- */
-global define boolean Modified(string devregex) {
- map Mods = Filter(Modules, devregex);
- map OriginalMods = Filter(OriginalModules, devregex);
- y2debug("OriginalMods=%1", OriginalMods);
- y2debug("Mods=%1", Mods);
- return Mods == OriginalMods;
-}
-
-global define list GetFreeModules(string type, integer num) {
- y2debug("Modules=%1", Modules);
- y2debug("type,num=%1,%2", type, num);
- y2debug("Modules[%1]=%2", type, Modules[type]:$[]);
-
- list curdevs = Map::Keys(Modules[type]:$[]);
- y2debug("curdevs=%1", curdevs);
-
- integer i = 0;
- integer count = 0;
- list ret = [];
-
- /* Hotpluggable modules */
- if(NetworkDevices::IsHotplug(type) && !contains(curdevs, "")) {
- y2debug("Added simple hotplug module");
- count = count + 1;
- ret = add(ret, "");
- }
-
- /* Remaining numbered modules */
- while(count < num) {
- string ii = sformat("%1", i);
- if(!contains(curdevs, ii)) {
- ret = add(ret, ii);
- count = count + 1;
- }
- i = i + 1;
- }
-
- y2debug("Free modules=%1", ret);
- return ret;
-}
-
-/**
- * Get modules of the given type
- * @param type modules type ("" for all)
- * @return list of found modules
- */
-global define list List(string devregex) {
-
- list ret = [];
- if(devregex == "" || devregex == nil) {
- maplist(string t, map d, Modules, {
- maplist(string n, (list<string>) Map::Keys(d), {
- ret[size(ret)] = NetworkDevices::device_name(t,n);
- });
- });
- }
- else {
- string regex = "^(" + NetworkDevices::CardRegex[devregex]:devregex + ")[0-9]*$";
- maplist(string t, map d, Modules, {
- if(regexpmatch(t, regex)) {
- maplist(string n, (list<string>) Map::Keys(d), {
- ret[size(ret)] = NetworkDevices::device_name(t,n);
- });
- }
- });
- /*
- map d = Modules[type]:$[];
- maplist(string n, Map::Keys(d), {ret[size(ret)] = NetworkDevices::device_name(type,n);});
- */
- }
-
- y2debug("ret=%1", ret);
- return ret;
-}
-
-/**
- * Call HwUp for hardware that is not handled by hotplug (#44626)
- * Probably obsoleted by the code in Write
- */
-global boolean HwUp () {
- boolean ok = true;
- foreach (string hwcfg_name, any v, Modules, {
- if (regexpmatch (hwcfg_name, "^static"))
- {
- ok = SCR::Execute (.target.bash, "hwup "+ hwcfg_name) == 0 && ok;
- }
- });
- return ok;
-}
-
-/**
- * #46803: forbid "/" (filename), maybe also "-" (separator) "_" (escape)
- */
-global string ValidCharsHwcfg () {
- return String::ValidCharsFilename ();
-}
-
-
-/* EOF */
-}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-network-2.15.55/src/routines/routines.ycp new/yast2-network-2.15.57/src/routines/routines.ycp
--- old/yast2-network-2.15.55/src/routines/routines.ycp 2007-07-17 07:38:21.000000000 +0200
+++ new/yast2-network-2.15.57/src/routines/routines.ycp 2007-08-06 17:41:40.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Miscellaneous routines
* Authors: Michal Svec
*
- * $Id: routines.ycp 39452 2007-07-17 05:38:38Z mzugec $
+ * $Id: routines.ycp 40026 2007-08-06 15:37:14Z mzugec $
*/
{
@@ -19,7 +19,6 @@
import "PackageSystem";
import "NetworkDevices";
import "Arch";
-import "NetworkModules";
import "Confirm";
import "Map";
@@ -411,29 +410,6 @@
}
-string createHwcfgName(map hw, string type){
- string hwcfg_name = "";
- // name of hwcfg
- if(hasAnyValue(hw["busid"]:"")) {
- // #208854 - include "static" string
- if(issubstring(hw["sysfs_id"]:"", "pnp")){
- hwcfg_name = "static-bus-" + hw["bus"]:"" + "-" + hw["busid"]:"";
- }
- else{
- hwcfg_name = "bus-" + hw["bus"]:"" + "-" + hw["busid"]:"";
- if(Arch::s390 ()) hwcfg_name = DriverType(type) + "-" + hwcfg_name;
- }
- }
- else {
- // #suse42421 - don't write hwcfg-static for pcmcia cards (PC and CardBus)
- // #254753 - when busID not available, use static-x hwcfg filename
- if(Arch::s390 ()) {
- hwcfg_name = NetworkModules::GetFreeName("static-");
- y2internal("No bus id info found, will use %1", hwcfg_name);
- } else y2warning ("No bus id info found, skipping hwcfg: %1", hw);
- }
- return hwcfg_name;
-}
define string DistinguishedName(string name, map hwdevice) {
if(hwdevice["sysfs_bus_id"]:"" != "")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-network-2.15.55/VERSION new/yast2-network-2.15.57/VERSION
--- old/yast2-network-2.15.55/VERSION 2007-07-26 14:16:11.000000000 +0200
+++ new/yast2-network-2.15.57/VERSION 2007-08-06 17:57:34.000000000 +0200
@@ -1 +1 @@
-2.15.55
+2.15.57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org