Hello community,

here is the log from the commit of package yast2-network for openSUSE:Factory
checked in at Fri Aug 12 10:21:05 CEST 2011.



--------
--- yast2-network/yast2-network.changes 2011-08-04 16:40:50.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-network/yast2-network.changes    
2011-08-11 17:26:08.000000000 +0200
@@ -1,0 +2,13 @@
+Thu Aug 11 16:33:26 CEST 2011 - [email protected]
+
+- Omit unnecessary INTERFACETYPE declaration in ifcfg (bnc#711762)
+  This broke the VM-proposed bridge because it copied ifcfg-ethN's
+  INTERFACETYPE=eth (bnc#704999).
+- 2.21.2
+
+-------------------------------------------------------------------
+Fri Aug  5 12:34:09 CEST 2011 - [email protected]
+
+- fixed .desktop file (bnc #681249)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  yast2-network-2.21.1.tar.bz2

New:
----
  yast2-network-2.21.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.lUVETY/_old  2011-08-12 10:19:41.000000000 +0200
+++ /var/tmp/diff_new_pack.lUVETY/_new  2011-08-12 10:19:41.000000000 +0200
@@ -19,11 +19,11 @@
 
 
 Name:           yast2-network
-Version:        2.21.1
+Version:        2.21.2
 Release:        1
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source0:        yast2-network-2.21.1.tar.bz2
+Source0:        yast2-network-2.21.2.tar.bz2
 
 Prefix:         /usr
 
@@ -64,7 +64,6 @@
 
 %package devel-doc
 
-
 Group:          System/YaST
 Summary:        YaST2 - Developer documentation for yast2-network
 
@@ -75,7 +74,7 @@
 This package contains autogenerated documentation for yast2-network
 
 %prep
-%setup -n yast2-network-2.21.1
+%setup -n yast2-network-2.21.2
 
 %build
 %{prefix}/bin/y2tool y2autoconf
@@ -145,5 +144,4 @@
 %doc %{prefix}/share/doc/packages/yast2-network
 %exclude %{prefix}/share/doc/packages/yast2-network/COPYING
 %exclude %{prefix}/share/doc/packages/yast2-network/README
-
 %changelog

++++++ yast2-network-2.21.1.tar.bz2 -> yast2-network-2.21.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/VERSION 
new/yast2-network-2.21.2/VERSION
--- old/yast2-network-2.21.1/VERSION    2011-08-04 16:38:36.000000000 +0200
+++ new/yast2-network-2.21.2/VERSION    2011-08-11 17:11:57.000000000 +0200
@@ -1 +1 @@
-2.21.1
+2.21.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/configure 
new/yast2-network-2.21.2/configure
--- old/yast2-network-2.21.1/configure  2011-08-04 16:38:40.000000000 +0200
+++ new/yast2-network-2.21.2/configure  2011-08-11 17:12:01.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for yast2-network 2.21.1.
+# Generated by GNU Autoconf 2.68 for yast2-network 2.21.2.
 #
 # 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.21.1'
-PACKAGE_STRING='yast2-network 2.21.1'
+PACKAGE_VERSION='2.21.2'
+PACKAGE_STRING='yast2-network 2.21.2'
 PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
 PACKAGE_URL=''
 
@@ -1229,7 +1229,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.21.1 to adapt to many kinds of systems.
+\`configure' configures yast2-network 2.21.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1300,7 +1300,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of yast2-network 2.21.1:";;
+     short | recursive ) echo "Configuration of yast2-network 2.21.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1380,7 +1380,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-yast2-network configure 2.21.1
+yast2-network configure 2.21.2
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1397,7 +1397,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.21.1, which was
+It was created by yast2-network $as_me 2.21.2, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -2327,7 +2327,7 @@
 
 # Define the identity of the package.
  PACKAGE='yast2-network'
- VERSION='2.21.1'
+ VERSION='2.21.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2449,7 +2449,7 @@
 
 
 
-VERSION="2.21.1"
+VERSION="2.21.2"
 RPMNAME="yast2-network"
 MAINTAINER="Martin Vidner <[email protected]>"
 
@@ -3379,7 +3379,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.21.1, which was
+This file was extended by yast2-network $as_me 2.21.2, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -3432,7 +3432,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-yast2-network config.status 2.21.1
+yast2-network config.status 2.21.2
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/configure.in 
new/yast2-network-2.21.2/configure.in
--- old/yast2-network-2.21.1/configure.in       2011-08-04 16:38:37.000000000 
+0200
+++ new/yast2-network-2.21.2/configure.in       2011-08-11 17:11:58.000000000 
+0200
@@ -3,7 +3,7 @@
 dnl -- This file is generated by y2autoconf 2.18.11 - DO NOT EDIT! --
 dnl    (edit configure.in.in instead)
 
-AC_INIT(yast2-network, 2.21.1, http://bugs.opensuse.org/, yast2-network)
+AC_INIT(yast2-network, 2.21.2, http://bugs.opensuse.org/, yast2-network)
 dnl Check for presence of file 'RPMNAME'
 AC_CONFIG_SRCDIR([RPMNAME])
 
@@ -18,7 +18,7 @@
 AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
 
 dnl Important YaST2 variables
-VERSION="2.21.1"
+VERSION="2.21.2"
 RPMNAME="yast2-network"
 MAINTAINER="Martin Vidner <[email protected]>"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/src/config/dsl.desktop 
new/yast2-network-2.21.2/src/config/dsl.desktop
--- old/yast2-network-2.21.1/src/config/dsl.desktop     2011-08-04 
16:38:35.000000000 +0200
+++ new/yast2-network-2.21.2/src/config/dsl.desktop     2011-08-11 
17:11:53.000000000 +0200
@@ -3,7 +3,6 @@
 Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Network;
 
 X-KDE-ModuleType=Library
-X-KDE-RootOnly=true
 X-KDE-HasReadOnlyMode=true
 X-KDE-Library=yast2
 X-SuSE-YaST-Call=dsl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/src/config/host.desktop 
new/yast2-network-2.21.2/src/config/host.desktop
--- old/yast2-network-2.21.1/src/config/host.desktop    2011-08-04 
16:38:35.000000000 +0200
+++ new/yast2-network-2.21.2/src/config/host.desktop    2011-08-11 
17:11:53.000000000 +0200
@@ -3,7 +3,6 @@
 Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Net_advanced;
 
 X-KDE-ModuleType=Library
-X-KDE-RootOnly=true
 X-KDE-HasReadOnlyMode=true
 X-KDE-Library=yast2
 X-SuSE-YaST-Call=host
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/src/config/isdn.desktop 
new/yast2-network-2.21.2/src/config/isdn.desktop
--- old/yast2-network-2.21.1/src/config/isdn.desktop    2011-08-04 
16:38:35.000000000 +0200
+++ new/yast2-network-2.21.2/src/config/isdn.desktop    2011-08-11 
17:11:53.000000000 +0200
@@ -3,7 +3,6 @@
 Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Network;
 
 X-KDE-ModuleType=Library
-X-KDE-RootOnly=true
 X-KDE-HasReadOnlyMode=true
 X-KDE-Library=yast2
 X-SuSE-YaST-Call=isdn
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/src/config/lan.desktop 
new/yast2-network-2.21.2/src/config/lan.desktop
--- old/yast2-network-2.21.1/src/config/lan.desktop     2011-08-04 
16:38:35.000000000 +0200
+++ new/yast2-network-2.21.2/src/config/lan.desktop     2011-08-11 
17:11:53.000000000 +0200
@@ -3,7 +3,6 @@
 Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Network;
 
 X-KDE-ModuleType=Library
-X-KDE-RootOnly=true
 X-KDE-HasReadOnlyMode=true
 X-KDE-Library=yast2
 X-SuSE-YaST-Call=lan
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/src/config/modem.desktop 
new/yast2-network-2.21.2/src/config/modem.desktop
--- old/yast2-network-2.21.1/src/config/modem.desktop   2011-08-04 
16:38:35.000000000 +0200
+++ new/yast2-network-2.21.2/src/config/modem.desktop   2011-08-11 
17:11:53.000000000 +0200
@@ -3,7 +3,6 @@
 Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Network;
 
 X-KDE-ModuleType=Library
-X-KDE-RootOnly=true
 X-KDE-HasReadOnlyMode=true
 X-KDE-Library=yast2
 X-SuSE-YaST-Call=modem
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/src/config/network.desktop 
new/yast2-network-2.21.2/src/config/network.desktop
--- old/yast2-network-2.21.1/src/config/network.desktop 2011-08-04 
16:38:35.000000000 +0200
+++ new/yast2-network-2.21.2/src/config/network.desktop 2011-08-11 
17:11:53.000000000 +0200
@@ -3,7 +3,6 @@
 Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Net_advanced;
 
 X-KDE-ModuleType=Library
-X-KDE-RootOnly=true
 X-KDE-HasReadOnlyMode=true
 X-KDE-Library=yast2
 X-SuSE-YaST-Call=network
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/src/config/provider.desktop 
new/yast2-network-2.21.2/src/config/provider.desktop
--- old/yast2-network-2.21.1/src/config/provider.desktop        2011-08-04 
16:38:35.000000000 +0200
+++ new/yast2-network-2.21.2/src/config/provider.desktop        2011-08-11 
17:11:53.000000000 +0200
@@ -3,7 +3,6 @@
 Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Net_advanced;
 
 X-KDE-ModuleType=Library
-X-KDE-RootOnly=true
 X-KDE-HasReadOnlyMode=true
 X-KDE-Library=yast2
 X-SuSE-YaST-Call=provider
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/src/config/proxy.desktop 
new/yast2-network-2.21.2/src/config/proxy.desktop
--- old/yast2-network-2.21.1/src/config/proxy.desktop   2011-08-04 
16:38:35.000000000 +0200
+++ new/yast2-network-2.21.2/src/config/proxy.desktop   2011-08-11 
17:11:53.000000000 +0200
@@ -3,7 +3,6 @@
 Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Net_advanced;
 
 X-KDE-ModuleType=Library
-X-KDE-RootOnly=true
 X-KDE-HasReadOnlyMode=true
 X-KDE-Library=yast2
 X-SuSE-YaST-Call=proxy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/src/config/remote.desktop 
new/yast2-network-2.21.2/src/config/remote.desktop
--- old/yast2-network-2.21.1/src/config/remote.desktop  2011-08-04 
16:38:35.000000000 +0200
+++ new/yast2-network-2.21.2/src/config/remote.desktop  2011-08-11 
17:11:53.000000000 +0200
@@ -3,7 +3,6 @@
 Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Net_advanced;
 
 X-KDE-ModuleType=Library
-X-KDE-RootOnly=true
 X-KDE-HasReadOnlyMode=true
 X-KDE-Library=yast2
 X-SuSE-YaST-Call=remote
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/src/modules/Lan.ycp 
new/yast2-network-2.21.2/src/modules/Lan.ycp
--- old/yast2-network-2.21.1/src/modules/Lan.ycp        2011-08-04 
16:38:35.000000000 +0200
+++ new/yast2-network-2.21.2/src/modules/Lan.ycp        2011-08-11 
17:11:54.000000000 +0200
@@ -4,7 +4,7 @@
  * Summary:    Network card data
  * Authors:    Michal Svec <[email protected]>
  *
- * $Id: Lan.ycp 64967 2011-07-22 16:09:02Z mvidner $
+ * $Id: Lan.ycp 65315 2011-08-11 14:58:34Z mvidner $
  *
  * Representation of the configuration of network cards.
  * Input and output routines.
@@ -827,51 +827,41 @@
 
 }
 
-/**
- * Propose interface configuration
- * @return true if something was proposed
- */
-global define boolean ProposeInterfaces () {
-
-    y2milestone("Hardware=%1", LanItems::Hardware);
-//    y2milestone("InstallInf=%1", InstallInf);
-
-    y2milestone("NetworkConfig::Config=%1", NetworkConfig::Config);
-    y2milestone("NetworkConfig::DHCP=%1", NetworkConfig::DHCP);
-
- // test if we have any virtualization installed
- if (virt_net_proposal)
- {
-  y2milestone("Virtualization [xen|kvm|qemu] detected - will propose 
virtualization network");
-    // in case of virtualization use special proposal
-    // collect all interfaces that will be skipped from bridged proposal
+list<string> IfcfgsToSkipVirtualizedProposal() {
     list<string> skipped = [];
     foreach(integer current, any config, LanItems::Items, {
-     string ifcfg = LanItems::Items[current, "ifcfg"]:"";
-     if (NetworkInterfaces::GetType(ifcfg)=="br"){
-       NetworkInterfaces::Edit(ifcfg);
-       y2milestone("Bridge %1 with ports (%2) found", ifcfg, 
NetworkInterfaces::Current["BRIDGE_PORTS"]:"");
-       skipped=add(skipped, ifcfg);
-        foreach(string port, (list<string>) 
splitstring(NetworkInterfaces::Current["BRIDGE_PORTS"]:"", " "), {
-         skipped=add(skipped, port);
-       });
-     }
-     if (NetworkInterfaces::GetType(ifcfg)=="bond"){
-      NetworkInterfaces::Edit(ifcfg);
-      foreach(string i, (list<string>)splitstring("0,1,2,3,4,5,6,7,8,9", ","), 
{
-       string slave = NetworkInterfaces::Current[sformat("BONDING_SLAVE%1", 
i)]:"";
-       y2milestone("For interface %1 found slave %2", ifcfg, slave);
-       if(size(slave)>0) skipped=add(skipped, slave);
-      });
-     }
-    if (NetworkInterfaces::GetValue(ifcfg, "STARTMODE")=="nfsroot"){
-     y2milestone("Skipped %1 interface from bridge slaves because of 
nfsroot.", ifcfg);
-     skipped=add(skipped, ifcfg);
-    }
-    });
+            string ifcfg = LanItems::Items[current, "ifcfg"]:"";
+            if (NetworkInterfaces::GetType(ifcfg)=="br"){
+                NetworkInterfaces::Edit(ifcfg);
+                y2milestone("Bridge %1 with ports (%2) found", ifcfg, 
NetworkInterfaces::Current["BRIDGE_PORTS"]:"");
+                skipped=add(skipped, ifcfg);
+                foreach(string port, (list<string>) 
splitstring(NetworkInterfaces::Current["BRIDGE_PORTS"]:"", " "), {
+                        skipped=add(skipped, port);
+                    });
+            }
+            if (NetworkInterfaces::GetType(ifcfg)=="bond"){
+                NetworkInterfaces::Edit(ifcfg);
+                foreach(string i, 
(list<string>)splitstring("0,1,2,3,4,5,6,7,8,9", ","), {
+                        string slave = 
NetworkInterfaces::Current[sformat("BONDING_SLAVE%1", i)]:"";
+                        y2milestone("For interface %1 found slave %2", ifcfg, 
slave);
+                        if(size(slave)>0) skipped=add(skipped, slave);
+                    });
+            }
+            if (NetworkInterfaces::GetValue(ifcfg, "STARTMODE")=="nfsroot"){
+                y2milestone("Skipped %1 interface from bridge slaves because 
of nfsroot.", ifcfg);
+                skipped=add(skipped, ifcfg);
+            }
+        });
     y2milestone("Skipped interfaces : %1", skipped);
+    return skipped;
+}
+
+void ProposeVirtualized() {
+    // in case of virtualization use special proposal
+    // collect all interfaces that will be skipped from bridged proposal
+    list<string> skipped = IfcfgsToSkipVirtualizedProposal();
 
-    // configure all connected unconfigured devices with dhcp (with default 
parameters)
+    // first configure all connected unconfigured devices with dhcp (with 
default parameters)
     foreach (integer number, any lanitem, LanItems::Items, {
        if (hasAnyValue(((map)lanitem)["hwinfo", "dev_name"]:"")) {
        LanItems::current = number;
@@ -892,106 +882,118 @@
     // then each configuration (except bridges) move to the bridge
     // and add old device name into bridge_ports
     foreach(integer current, any config, LanItems::Items, {
-     string ifcfg = LanItems::Items[current, "ifcfg"]:"";
-     if (contains(skipped, ifcfg)){
-       y2milestone("Skipping interface %1", ifcfg);
-       continue;
-     }
-      if (size(ifcfg)>0){
-       NetworkInterfaces::Edit(ifcfg);
-       map<string, any> old_config = NetworkInterfaces::Current;
-       y2debug("Old Config %1\n%2", ifcfg, old_config);
-       string new_ifcfg = sformat("br%1", 
NetworkInterfaces::GetFreeDevice("br"));
-       y2milestone("old configuration %1, bridge %2", ifcfg, new_ifcfg);
-       NetworkInterfaces::Name = new_ifcfg;
-       // from bridge interface remove all bonding-related stuff
-       foreach(string key, any value, NetworkInterfaces::Current, {
-       if (issubstring(key, "BONDING")){
-        NetworkInterfaces::Current[key]=nil;
-       }
-       });
-       NetworkInterfaces::Current["BRIDGE"]="yes";
-       NetworkInterfaces::Current["BRIDGE_PORTS"]=ifcfg;
-       NetworkInterfaces::Current["BRIDGE_STP"]="off";
-       NetworkInterfaces::Current["BRIDGE_FORWARDDELAY"]="0";
-       // hardcode startmode (bnc#450670), it can't be ifplugd!
-       NetworkInterfaces::Current["STARTMODE"]="auto";
-       // remove description - will be replaced by new (real) one
-       NetworkInterfaces::Current=remove(NetworkInterfaces::Current, "NAME");
-       if( NetworkInterfaces::Commit() ){
-       NetworkInterfaces::Add();
-       NetworkInterfaces::Edit(ifcfg);
-       old_config["BOOTPROTO"]="static";
-       old_config["IPADDR"]="0.0.0.0/32";
-       // remove all aliases (bnc#590167)
-       foreach (string a, any v, (map <string, 
any>)NetworkInterfaces::Current["_aliases"]:$[], {
-           if (v != nil) { NetworkInterfaces::DeleteAlias 
(NetworkInterfaces::Name, a); }
-       });
-       old_config["_aliases"]=$[];
-        y2milestone("Old Config with apllied changes %1\n%2", ifcfg, 
old_config);
-       NetworkInterfaces::Current = old_config;
-        NetworkInterfaces::Commit();
-
-        LanItems::Items[current, "ifcfg"] = new_ifcfg;
-        LanItems::modified=true;
-        LanItems::force_restart=true;
-        y2internal("List %1", NetworkInterfaces::List(""));
-        // re-read configuration to see new items in UI
-        LanItems::Read();
-      }
-     } else y2warning("empty ifcfg");
-    });
- } else {
+            string ifcfg = LanItems::Items[current, "ifcfg"]:"";
+            if (contains(skipped, ifcfg)){
+                y2milestone("Skipping interface %1", ifcfg);
+                continue;
+            }
+            else if (size(ifcfg)>0){
+                NetworkInterfaces::Edit(ifcfg);
+                map<string, any> old_config = NetworkInterfaces::Current;
+                y2debug("Old Config %1\n%2", ifcfg, old_config);
+                string new_ifcfg = sformat("br%1", 
NetworkInterfaces::GetFreeDevice("br"));
+                y2milestone("old configuration %1, bridge %2", ifcfg, 
new_ifcfg);
+                NetworkInterfaces::Name = new_ifcfg;
+                // from bridge interface remove all bonding-related stuff
+                foreach(string key, any value, NetworkInterfaces::Current, {
+                        if (issubstring(key, "BONDING")){
+                            NetworkInterfaces::Current[key]=nil;
+                        }
+                    });
+                NetworkInterfaces::Current["BRIDGE"]="yes";
+                NetworkInterfaces::Current["BRIDGE_PORTS"]=ifcfg;
+                NetworkInterfaces::Current["BRIDGE_STP"]="off";
+                NetworkInterfaces::Current["BRIDGE_FORWARDDELAY"]="0";
+                // hardcode startmode (bnc#450670), it can't be ifplugd!
+                NetworkInterfaces::Current["STARTMODE"]="auto";
+                // remove description - will be replaced by new (real) one
+                NetworkInterfaces::Current=remove(NetworkInterfaces::Current, 
"NAME");
+                if( NetworkInterfaces::Commit() ){
+                    NetworkInterfaces::Add();
+                    NetworkInterfaces::Edit(ifcfg);
+                    old_config["BOOTPROTO"]="static";
+                    old_config["IPADDR"]="0.0.0.0/32";
+                    // remove all aliases (bnc#590167)
+                    foreach (string a, any v, (map <string, 
any>)NetworkInterfaces::Current["_aliases"]:$[], {
+                            if (v != nil) { NetworkInterfaces::DeleteAlias 
(NetworkInterfaces::Name, a); }
+                        });
+                    old_config["_aliases"]=$[];
+                    y2milestone("Old Config with apllied changes %1\n%2", 
ifcfg, old_config);
+                    NetworkInterfaces::Current = old_config;
+                    NetworkInterfaces::Commit();
+
+                    LanItems::Items[current, "ifcfg"] = new_ifcfg;
+                    LanItems::modified=true;
+                    LanItems::force_restart=true;
+                    y2internal("List %1", NetworkInterfaces::List(""));
+                    // re-read configuration to see new items in UI
+                    LanItems::Read();
+                }
+            }
+            else y2warning("empty ifcfg");
+        });
+}
 
-    if (! LanItems::nm_proposal_valid)
-    {
-       NetworkService::SetManaged (UseNetworkManager ());
-       LanItems::nm_proposal_valid = true;
-    }
+/**
+ * Propose interface configuration
+ * @return true if something was proposed
+ */
+global define boolean ProposeInterfaces () {
+    y2milestone("Hardware=%1", LanItems::Hardware);
 
-    if (NetworkService::IsManaged ())
-    {
-       ProposeNMInterfaces ();
+    y2milestone("NetworkConfig::Config=%1", NetworkConfig::Config);
+    y2milestone("NetworkConfig::DHCP=%1", NetworkConfig::DHCP);
 
-       LanItems::modified = true;      // #144139 workaround
-       y2milestone ("NM proposal");
-       return true;
-    }
+    // test if we have any virtualization installed
+    if (virt_net_proposal) {
+        y2milestone("Virtualization [xen|kvm|qemu] detected - will propose 
virtualization network");
+        ProposeVirtualized();
+    }
+    else {
+
+        if (! LanItems::nm_proposal_valid) {
+            NetworkService::SetManaged (UseNetworkManager ());
+            LanItems::nm_proposal_valid = true;
+        }
 
+        if (NetworkService::IsManaged ()) {
+            ProposeNMInterfaces ();
 
-  }
+            LanItems::modified = true; // #144139 workaround
+            y2milestone ("NM proposal");
+            return true;
+        }
+
+    }
     /* Something is already configured -> do nothing */
     boolean configured=false;
     foreach (integer number, any lanitem, LanItems::Items, {
-       LanItems::current = number;
-       if (LanItems::IsItemConfigured()){
-        y2milestone("Something already configured: don't propose.");
-        configured = true;
-        break;
-        }
-      });
+            LanItems::current = number;
+            if (LanItems::IsItemConfigured()){
+                y2milestone("Something already configured: don't propose.");
+                configured = true;
+                break;
+            }
+        });
     if (configured) return false;
 
 
     foreach (integer number, any lanitem, LanItems::Items, {
-       if (hasAnyValue(((map)lanitem)["hwinfo", "dev_name"]:"")) {
-       LanItems::current = number;
-        boolean link = LanItems::getCurrentItem()["hwinfo", "link"]:false;
-       if (LanItems::getCurrentItem()["hwinfo", "type"]:"" == "wlan")
-               y2warning("Will not propose wlan interfaces");
-       else{
-               if (!link) y2warning("item number %1 has link:false detected", 
number);
-                       else if (!LanItems::IsItemConfigured() && link){
-                         y2milestone("Nothing already configured - start 
proposing");
-                         LanItems::ProposeItem();
-                         break;
-                        }
-           }
-       }
-    });
-
-
-
+            if (hasAnyValue(((map)lanitem)["hwinfo", "dev_name"]:"")) {
+                LanItems::current = number;
+                boolean link = LanItems::getCurrentItem()["hwinfo", 
"link"]:false;
+                if (LanItems::getCurrentItem()["hwinfo", "type"]:"" == "wlan")
+                    y2warning("Will not propose wlan interfaces");
+                else{
+                    if (!link) y2warning("item number %1 has link:false 
detected", number);
+                    else if (!LanItems::IsItemConfigured() && link){
+                        y2milestone("Nothing already configured - start 
proposing");
+                        LanItems::ProposeItem();
+                        break;
+                    }
+                }
+            }
+        });
 
     y2milestone("NetworkConfig::Config=%1", NetworkConfig::Config);
     y2milestone("NetworkConfig::DHCP=%1", NetworkConfig::DHCP);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-2.21.1/src/modules/LanItems.ycp 
new/yast2-network-2.21.2/src/modules/LanItems.ycp
--- old/yast2-network-2.21.1/src/modules/LanItems.ycp   2011-08-04 
16:38:35.000000000 +0200
+++ new/yast2-network-2.21.2/src/modules/LanItems.ycp   2011-08-11 
17:11:54.000000000 +0200
@@ -1181,7 +1181,8 @@
        // L3: bnc#585458
        // FIXME: INTERFACETYPE confuses sysconfig, bnc#458412
        // Only test when newdev has enough info for GetTypeFromIfcfg to work.
-       if (NetworkInterfaces::GetTypeFromIfcfg(newdev) != type) {
+        string implied_type = NetworkInterfaces::GetTypeFromIfcfg(newdev);
+        if (implied_type != nil && implied_type != type) {
            newdev["INTERFACETYPE"]=type;
        }
 


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to