Hello community,
here is the log from the commit of package yast2-network for openSUSE:Factory
checked in at Thu Dec 4 18:08:24 CET 2008.
--------
--- yast2-network/yast2-network.changes 2008-11-28 16:59:14.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-network/yast2-network.changes 2008-12-04 14:50:19.000000000 +0100
@@ -1,0 +2,18 @@
+Thu Dec 4 14:45:42 CET 2008 - mzugec@suse.cz
+
+- in bridge proposal configure STARTMODE=onboot (bnc#450670)
+- 2.17.61
+
+-------------------------------------------------------------------
+Tue Dec 2 17:42:02 CET 2008 - kmachalkova@suse.cz
+
+- Allow setting hostname even if network is NM-controlled (bnc#444967)
+- Write only limited set of values (NetworkConfig, DNS, Hostname)
+ in case of NM on installed system, do not restart/reload network
+
+-------------------------------------------------------------------
+Tue Dec 2 14:00:09 CET 2008 - ug@suse.de
+
+- rnc file fixed
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-network-2.17.60.tar.bz2
New:
----
yast2-network-2.17.61.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.bm8176/_old 2008-12-04 18:08:09.000000000 +0100
+++ /var/tmp/diff_new_pack.bm8176/_new 2008-12-04 18:08:09.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-network (Version 2.17.60)
+# spec file for package yast2-network (Version 2.17.61)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-network
-Version: 2.17.60
+Version: 2.17.61
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-network-2.17.60.tar.bz2
+Source0: yast2-network-2.17.61.tar.bz2
Prefix: /usr
# should be required by devtools
BuildRequires: perl-XML-Writer pkgconfig rpm
@@ -77,7 +77,7 @@
Michal Svec
%prep
-%setup -n yast2-network-2.17.60
+%setup -n yast2-network-2.17.61
%build
%{prefix}/bin/y2tool y2autoconf
@@ -141,6 +141,15 @@
%exclude %{prefix}/share/doc/packages/yast2-network/COPYING
%exclude %{prefix}/share/doc/packages/yast2-network/README
%changelog
+* Thu Dec 04 2008 mzugec@suse.cz
+- in bridge proposal configure STARTMODE=onboot (bnc#450670)
+- 2.17.61
+* Tue Dec 02 2008 kmachalkova@suse.cz
+- Allow setting hostname even if network is NM-controlled (bnc#444967)
+- Write only limited set of values (NetworkConfig, DNS, Hostname)
+ in case of NM on installed system, do not restart/reload network
+* Tue Dec 02 2008 ug@suse.de
+- rnc file fixed
* Fri Nov 28 2008 mzugec@suse.cz
- don't show "no network running" popup for automatic installation
(bnc#449777)
++++++ yast2-network-2.17.60.tar.bz2 -> yast2-network-2.17.61.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.17.60/configure new/yast2-network-2.17.61/configure
--- old/yast2-network-2.17.60/configure 2008-11-28 16:43:22.000000000 +0100
+++ new/yast2-network-2.17.61/configure 2008-12-04 13:09:54.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for yast2-network 2.17.59.
+# Generated by GNU Autoconf 2.63 for yast2-network 2.17.60.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -596,8 +596,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-network'
PACKAGE_TARNAME='yast2-network'
-PACKAGE_VERSION='2.17.59'
-PACKAGE_STRING='yast2-network 2.17.59'
+PACKAGE_VERSION='2.17.60'
+PACKAGE_STRING='yast2-network 2.17.60'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1274,7 +1274,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.17.59 to adapt to many kinds of systems.
+\`configure' configures yast2-network 2.17.60 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1345,7 +1345,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-network 2.17.59:";;
+ short | recursive ) echo "Configuration of yast2-network 2.17.60:";;
esac
cat <<\_ACEOF
@@ -1425,7 +1425,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-network configure 2.17.59
+yast2-network configure 2.17.60
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1439,7 +1439,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.17.59, which was
+It was created by yast2-network $as_me 2.17.60, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2286,7 +2286,7 @@
# Define the identity of the package.
PACKAGE='yast2-network'
- VERSION='2.17.59'
+ VERSION='2.17.60'
cat >>confdefs.h <<_ACEOF
@@ -2510,7 +2510,7 @@
-VERSION="2.17.59"
+VERSION="2.17.60"
RPMNAME="yast2-network"
MAINTAINER="Michal Zugec "
@@ -3451,7 +3451,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.17.59, which was
+This file was extended by yast2-network $as_me 2.17.60, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3501,7 +3501,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-yast2-network config.status 2.17.59
+yast2-network config.status 2.17.60
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.17.60/configure.in new/yast2-network-2.17.61/configure.in
--- old/yast2-network-2.17.60/configure.in 2008-11-28 16:43:13.000000000 +0100
+++ new/yast2-network-2.17.61/configure.in 2008-12-04 13:09:45.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-network, 2.17.59, http://bugs.opensuse.org/, yast2-network)
+AC_INIT(yast2-network, 2.17.60, 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.17.59"
+VERSION="2.17.60"
RPMNAME="yast2-network"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.17.60/src/config/networking.rnc new/yast2-network-2.17.61/src/config/networking.rnc
--- old/yast2-network-2.17.60/src/config/networking.rnc 2008-11-14 13:14:43.000000000 +0100
+++ new/yast2-network-2.17.61/src/config/networking.rnc 2008-12-03 10:59:07.000000000 +0100
@@ -12,7 +12,8 @@
modules? &
dhcp_options? &
routing? &
- dns?
+ dns? &
+ net-udev?
}
managed =
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.17.60/src/modules/Lan.ycp new/yast2-network-2.17.61/src/modules/Lan.ycp
--- old/yast2-network-2.17.60/src/modules/Lan.ycp 2008-11-28 16:56:08.000000000 +0100
+++ new/yast2-network-2.17.61/src/modules/Lan.ycp 2008-12-04 14:46:49.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Network card data
* Authors: Michal Svec
*
- * $Id: Lan.ycp 53718 2008-11-28 15:56:07Z mzugec $
+ * $Id: Lan.ycp 53874 2008-12-04 13:46:49Z mzugec $
*
* Representation of the configuration of network cards.
* Input and output routines.
@@ -332,9 +332,7 @@
* @return true on success
*/
global define boolean Write() {
-
y2milestone("Writing configuration");
-// if(!write_only && NetHwDetection::running) NetHwDetection::Stop();
/* Stop the detection */
if(!LanItems::modified) {
@@ -343,6 +341,10 @@
}
boolean fw_is_installed = SuSEFirewall4Network::IsInstalled();
+ //A variable to determine whether we're on installed system and have NM -
+ //then, only limited setup is done
+ //FIXME: remove it once NetworkManager can set up everything
+ boolean NMonInstalledSys = NetworkService::IsManaged() && !Mode::installation();
/* Write dialog caption */
string caption = _("Saving Network Configuration");
@@ -350,71 +352,90 @@
integer sl = 0; /* 1000; /* TESTING */
sleep(sl);
- list<string> step_labels = [
- /* Progress stage 2 */
- _("Write drivers information"),
- /* Progress stage 3 - multiple devices may be present,really plural*/
- _("Write device configuration"),
- /* Progress stage 4 */
- _("Write network configuration"),
- /* Progress stage 5 */
- _("Write routing configuration"),
- /* Progress stage 6 */
- _("Write hostname and DNS configuration"),
- /* Progress stage 7 */
- _("Set up network services"),
- ];
- /* Progress stage 8 */
- if (fw_is_installed)
- step_labels=add(step_labels, _("Write firewall settings"));
- /* Progress stage 9 */
- if (!write_only) step_labels = add(step_labels, _("Activate network services"));
- /* Progress stage 10 */
- step_labels=add(step_labels, _("Run SuSEconfig"));
- if (!NetworkService::IsManaged() && /*(boolean) SCR::Read(.init.scripts.exists, "smpppd") &&*/ !write_only )
- {
- /* Progress stage 11 */
- step_labels=add(step_labels, _("Set up smpppd"));
- }
+ list<string> sl1 = [
+ /* Progress stage 2 */
+ _("Write drivers information"),
+ /* Progress stage 3 - multiple devices may be present,really plural*/
+ _("Write device configuration"),
+ /* Progress stage 4 */
+ _("Write routing configuration"),
+ ];
+
+ list<string> sl2 = [
+ /* Progress stage 5 */
+ _("Write network configuration"),
+ /* Progress stage 6 */
+ _("Write hostname and DNS configuration"),
+ /* Progress stage 7 */
+ _("Set up network services"),
+ ];
+
+ list <string> sl3 = [];
+ if (fw_is_installed)
+ /* Progress stage 8 */
+ sl3 = add(sl3, _("Write firewall settings"));
+ /* Progress stage 9 */
+ if (!write_only)
+ sl3 = add(sl3, _("Activate network services"));
+
+ /* Progress stage 10 */
+ sl3 =add(sl3, _("Run SuSEconfig"));
+
+ if (!NetworkService::IsManaged() && !write_only )
+ {
+ /* Progress stage 11 */
+ sl3 = add(sl3, _("Set up smpppd"));
+ }
+
+ list <string> step_labels = [];
+ if (!NMonInstalledSys)
+ step_labels = (list <string> ) merge(sl1, merge (sl2, sl3));
+ else
+ step_labels = sl2;
Progress::New(caption, " ", size(step_labels), step_labels, [], "");
+ //skip these steps iff NetworkManager & we're on installed system
+ if ( !NMonInstalledSys )
+ {
+ if(Abort()) return false;
+ /* Progress step 2 */
+ ProgressNextStage(_("Writing /etc/modprobe.conf..."));
+ //FIXME: unused?
+ sleep(sl);
- if(Abort()) return false;
- /* Progress step 2 */
- ProgressNextStage(_("Writing /etc/modprobe.conf..."));
- sleep(sl);
+ if(Abort()) return false;
+ /* Progress step 3 - multiple devices may be present, really plural*/
+ ProgressNextStage(_("Writing device configuration..."));
+ if (!Mode::autoinst()) LanItems::WriteUdevDriverRules();
+ NetworkInterfaces::Write("netcard");
+ // WriteDevices();
+ sleep(sl);
- if(Abort()) return false;
- /* Progress step 3 - multiple devices may be present, really plural*/
- ProgressNextStage(_("Writing device configuration..."));
- if (!Mode::autoinst()) LanItems::WriteUdevDriverRules();
- NetworkInterfaces::Write("netcard");
- // WriteDevices();
- sleep(sl);
+ if(Abort()) return false;
+ /* Progress step 4 */
+ ProgressNextStage(_("Writing routing configuration..."));
+ boolean orig = Progress::set (false);
+ Routing::Write();
+ Progress::set (orig);
+ sleep(sl);
+ }
if(Abort()) return false;
- /* Progress step 4 */
+ /* Progress step 5 */
ProgressNextStage(_("Writing network configuration..."));
NetworkConfig::Write();
sleep(sl);
if(Abort()) return false;
- /* Progress step 5 */
- ProgressNextStage(_("Writing routing configuration..."));
- boolean orig = Progress::set (false);
- Routing::Write();
- sleep(sl);
-
- if(Abort()) return false;
/* Progress step 6 */
ProgressNextStage(_("Writing hostname and DNS configuration..."));
// write resolv.conf after change from dhcp to static (#327074)
// reload/restart network before this to put correct resolv.conf from dhcp-backup
+ boolean orig = Progress::set (false);
DNS::Write();
Host::Write();
Progress::set (orig);
-
sleep(sl);
if(Abort()) return false;
@@ -424,106 +445,116 @@
writeIPv6();
sleep(sl);
- //Show this only if SuSEfirewall is installed
- if(fw_is_installed) {
- if(Abort()) return false;
- /* Progress step 8 */
- ProgressNextStage(_("Writing firewall settings..."));
- orig = Progress::set (false);
- SuSEFirewall4Network::Write ();
- Progress::set (orig);
- sleep(sl);
- }
+ //Do not write firewall and reload network if NM is in charge
+ //and we're on the installed system
+ if (!NMonInstalledSys)
+ {
+ //Show this only if SuSEfirewall is installed
+ if(fw_is_installed) {
+ if(Abort()) return false;
+ /* Progress step 8 */
+ ProgressNextStage(_("Writing firewall settings..."));
+ orig = Progress::set (false);
+ SuSEFirewall4Network::Write ();
+ Progress::set (orig);
+ sleep(sl);
+ }
- if(!write_only) {
- if(Abort()) return false;
- /* Progress step 9 */
- ProgressNextStage(_("Activating network services..."));
-// NetworkModules::HwUp ();
- // during installation export sysconfig settings into NetworkManager (bnc#433084)
- if (Mode::installation() && NetworkService::IsManaged()) y2internal("Export sysconfig settings into NetworkManager %1", SCR::Execute(.target.bash_output, "/usr/lib/NetworkManager/nm-opensuse-sysconfig-merge --connections"));
-
-y2internal("virt_net_proposal %1", virt_net_proposal);
- if (Stage::cont() && virt_net_proposal && (Linuxrc::usessh() || Linuxrc::vnc() || Linuxrc::display_ip())){
- UI::OpenDialog(`opt(`decorated), `HBox(
- `HSpacing(1),
- `HCenter(`HSquash(`VBox(
+ if(!write_only) {
+ if (Abort()) return false;
+ /* Progress step 9 */
+ ProgressNextStage(_("Activating network services..."));
+
+ // during installation export sysconfig settings into NetworkManager (bnc#433084)
+ if (Mode::installation() && NetworkService::IsManaged())
+ y2internal("Export sysconfig settings into NetworkManager %1", SCR::Execute(.target.bash_output, "/usr/lib/NetworkManager/nm-opensuse-sysconfig-merge --connections"));
+
+ // A special case for bridged network
+ y2internal("virt_net_proposal %1", virt_net_proposal);
+ if (Stage::cont() && virt_net_proposal && (Linuxrc::usessh() || Linuxrc::vnc() || Linuxrc::display_ip())){
+ UI::OpenDialog(`opt(`decorated), `HBox(
+ `HSpacing(1),
`HCenter(`HSquash(`VBox(
- // This is the heading of the popup box
- `Left(`Heading(_("Confirm Network Restart"))),
- `VSpacing(0.5),
- // This is in information message. Next come the
- // hardware class name (network cards).
- `HVCenter(`Label(_("Because of bridged network YaST2 needs to restart network to apply the settings."))),
- `VSpacing(0.5)
+ `HCenter(`HSquash(`VBox(
+ // This is the heading of the popup box
+ `Left(`Heading(_("Confirm Network Restart"))),
+ `VSpacing(0.5),
+ // This is in information message. Next come the
+ // hardware class name (network cards).
+ `HVCenter(`Label(_("Because of bridged network YaST2 needs to restart network to apply the settings."))),
+ `VSpacing(0.5)
+ ))),
+ `ButtonBox (
+ `HWeight (1, `PushButton (`id(`ok), `opt(`default, `okButton), Label::OKButton())),
+ /* PushButton label */
+ `HWeight (1, `PushButton (`id (`cancel), `opt (`cancelButton), Label::CancelButton()))
+ ),
+ `VSpacing(0.2)
))),
- `ButtonBox (
- `HWeight (1, `PushButton (`id(`ok), `opt(`default, `okButton), Label::OKButton())),
- /* PushButton label */
- `HWeight (1, `PushButton (`id (`cancel), `opt (`cancelButton), Label::CancelButton()))
- ),
- `VSpacing(0.2)
- ))),
- `HSpacing(1)
- ));
-
- UI::SetFocus (`id(`ok));
-
- // for autoinstallation popup has timeout 10 seconds (#192181)
- // timeout for every case (bnc#429562)
- any ret = UI::TimeoutUserInput(10*1000);
- if (ret==`ok){
- y2internal("Restarting network because of bridged proposal");
- Service::Restart("network");
- }
- UI::CloseDialog();
- }
+ `HSpacing(1)
+ ));
- // For ssh/vnc installation don't reload/restart network because possibility of IP change (bnc#347482)
- else if (Stage::cont() && (Linuxrc::usessh() || Linuxrc::vnc() || Linuxrc::display_ip())) y2milestone("For ssh or vnc installation don't reload/restart network during installation.");
- else if (LanItems::force_restart) Service::Restart("network");
- else if(Service::Status("network")==0){
- Service::Reload("network");
- } else Service::Restart("network");
-// NetworkService::StartStop ();
- sleep(sl);
- }
+ UI::SetFocus (`id(`ok));
- if(Abort()) return false;
- /* Progress step 10 */
- ProgressNextStage(_("Running SuSEconfig..."));
- if(!write_only) RunSuSEconfig();
- sleep(sl);
+ // for autoinstallation popup has timeout 10 seconds (#192181)
+ // timeout for every case (bnc#429562)
+ any ret = UI::TimeoutUserInput(10*1000);
+ if (ret==`ok){
+ y2internal("Restarting network because of bridged proposal");
+ Service::Restart("network");
+ }
+ UI::CloseDialog();
+ }
+
+ // For ssh/vnc installation don't reload/restart network because possibility of IP change (bnc#347482)
+ else if (Stage::cont() && (Linuxrc::usessh() || Linuxrc::vnc() || Linuxrc::display_ip()))
+ y2milestone("For ssh or vnc installation don't reload/restart network during installation.");
+ else if (LanItems::force_restart)
+ Service::Restart("network");
+ else if(Service::Status("network")==0){
+ Service::Reload("network");
+ }
+ else
+ Service::Restart("network");
+ sleep(sl);
+ }
- if (!NetworkService::IsManaged() /*&& (boolean) SCR::Read(.init.scripts.exists, "smpppd")*/ && !write_only )
- {
- if(Abort()) return false;
- /* Progress step 11 */
- ProgressNextStage(_("Setting up smpppd(8)..."));
- // takes care of autoinst by itself
- SetupSMPPPD(false);
- sleep(sl);
+ if(Abort()) return false;
+ /* Progress step 10 */
+ ProgressNextStage(_("Running SuSEconfig..."));
+ if(!write_only) RunSuSEconfig();
+ sleep(sl);
- }
+ if (!NetworkService::IsManaged() /*&& (boolean) SCR::Read(.init.scripts.exists, "smpppd")*/ && !write_only )
+ {
+ if(Abort()) return false;
+ /* Progress step 11 */
+ ProgressNextStage(_("Setting up smpppd(8)..."));
+ // takes care of autoinst by itself
+ SetupSMPPPD(false);
+ sleep(sl);
- if (NetworkService::IsManaged())
- {
- boolean network=false;
- integer timeout=15;
- while(timeout>0)
- {
- if (NetworkService::isNetworkRunning()){
- network=true;
- break;
- }
- y2milestone("waiting for network ... %1", timeout);
- sleep(1000);
- timeout = timeout-1;
- }
- if (!network) {
- if (automatic_configuration) y2error("No network running");
- else Popup::Error(_("No network running"));
- }
+ }
+
+ if (NetworkService::IsManaged())
+ {
+ boolean network=false;
+ integer timeout=15;
+ while(timeout>0)
+ {
+ if (NetworkService::isNetworkRunning()){
+ network=true;
+ break;
+ }
+ y2milestone("waiting for network ... %1", timeout);
+ sleep(1000);
+ timeout = timeout-1;
+ }
+ if (!network) {
+ if (automatic_configuration) y2error("No network running");
+ else Popup::Error(_("No network running"));
+ }
+ }
}
/* Final progress step */
@@ -829,6 +860,8 @@
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"]="onboot";
// remove description - will be replaced by new (real) one
NetworkInterfaces::Current=remove(NetworkInterfaces::Current, "NAME");
if( NetworkInterfaces::Commit() ){
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.17.60/src/routines/routines.ycp new/yast2-network-2.17.61/src/routines/routines.ycp
--- old/yast2-network-2.17.60/src/routines/routines.ycp 2008-11-28 12:38:23.000000000 +0100
+++ new/yast2-network-2.17.61/src/routines/routines.ycp 2008-12-03 10:59:07.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Miscellaneous routines
* Authors: Michal Svec
*
- * $Id: routines.ycp 53512 2008-11-21 13:24:58Z kmachalkova $
+ * $Id: routines.ycp 53826 2008-12-02 16:39:33Z kmachalkova $
*/
{
@@ -799,11 +799,11 @@
* if listed any items, disable them, if show_popup, show warning popup
*/
-boolean disableItemsIfNM(list<symbol> items, boolean show_popup){
+boolean disableItemsIfNM(list<any> items, boolean show_popup){
boolean disable=true;
if (Mode::normal() && NetworkService::IsManaged()){
- foreach(symbol w, items, {
- UI::ChangeWidget(w, `Enabled, false);
+ foreach(any w, items, {
+ UI::ChangeWidget(`id(w), `Enabled, false);
});
if (show_popup)
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.17.60/src/services/dns.ycp new/yast2-network-2.17.61/src/services/dns.ycp
--- old/yast2-network-2.17.60/src/services/dns.ycp 2008-11-05 09:28:02.000000000 +0100
+++ new/yast2-network-2.17.61/src/services/dns.ycp 2008-12-03 10:59:07.000000000 +0100
@@ -5,7 +5,7 @@
* Authors: Michal Svec
* Martin Vidner
*
- * $Id: dns.ycp 52754 2008-10-30 15:30:10Z kmachalkova $
+ * $Id: dns.ycp 53812 2008-12-02 13:43:34Z kmachalkova $
*/
{
@@ -123,7 +123,6 @@
define void InitHnWidget (string key) {
any value = hn_settings[key]:nil;
UI::ChangeWidget (`id (key), `Value, value);
- if (disableItemsIfNM([], false)) UI::ChangeWidget(`id (key),`Enabled, false);
}
@@ -146,11 +145,11 @@
* @return nil so that the dialog loops on
*/
define void InitDhcpHostname (string key) {
- if (!disableItemsIfNM([], false))
- UI::ChangeWidget (`id("DHCP_HOSTNAME"), `Enabled, has_dhcp);
+ UI::ChangeWidget (`id("DHCP_HOSTNAME"), `Enabled, has_dhcp);
if (!has_dhcp) UI::ReplaceWidget(`id ("dh_host_text"),`Label(_("No interface with dhcp")));
// the hostname dialog proposes to update it by DHCP on a laptop (#326102)
- else UI::ChangeWidget(`id("DHCP_HOSTNAME"), `Value, hn_settings["DHCP_HOSTNAME"]:true);
+ else
+ UI::ChangeWidget(`id("DHCP_HOSTNAME"), `Value, hn_settings["DHCP_HOSTNAME"]:true);
return nil;
}
@@ -162,9 +161,11 @@
* @return nil so that the dialog loops on
*/
define symbol HandleResolverData (string key, map event) {
- if (!disableItemsIfNM([], false))
+ //if this one is disabled, it means NM is in charge (see also initModifyResolvPolicy())
+ if ( (boolean) UI::QueryWidget(`id("MODIFY_RESOLV"),`Enabled ))
+ //thus, we should not re-enable already disabled widgets
UI::ChangeWidget (`id (key), `Enabled, resolver_modifiable);
- return nil;
+ return nil;
}
/**
@@ -246,26 +247,24 @@
void initPolicy(string key) {
-
- y2milestone("initPolicy: %1", UI::QueryWidget(`id("MODIFY_RESOLV"), `Value));
- if (!disableItemsIfNM([], false)){
- if(UI::QueryWidget(`id("MODIFY_RESOLV"), `Value) == `custom)
+ //first initialize correctly
+ y2milestone("initPolicy: %1", UI::QueryWidget(`id("MODIFY_RESOLV"), `Value));
+ if(UI::QueryWidget(`id("MODIFY_RESOLV"), `Value) == `custom)
+ {
+ UI::ChangeWidget(`id("PLAIN_POLICY"), `Enabled, true);
+ if (UI::QueryWidget(`id("PLAIN_POLICY"), `Value) == "")
{
- UI::ChangeWidget(`id("PLAIN_POLICY"), `Enabled, true);
- if (UI::QueryWidget(`id("PLAIN_POLICY"), `Value) == "")
- {
- UI::ChangeWidget(`id("PLAIN_POLICY"), `Value, DNS::resolv_conf_policy);
- }
+ UI::ChangeWidget(`id("PLAIN_POLICY"), `Value, DNS::resolv_conf_policy);
}
- else
- {
- UI::ChangeWidget(`id("PLAIN_POLICY"), `Value, "");
- UI::ChangeWidget(`id("PLAIN_POLICY"), `Enabled, false);
- }
- } else {
- UI::ChangeWidget(`id("MODIFY_RESOLV"), `Enabled, false);
- UI::ChangeWidget(`id("PLAIN_POLICY"), `Enabled, false);
- }
+ }
+ else
+ {
+ UI::ChangeWidget(`id("PLAIN_POLICY"), `Value, "");
+ UI::ChangeWidget(`id("PLAIN_POLICY"), `Enabled, false);
+ }
+ //then disable if needed
+ disableItemsIfNM([ "PLAIN_POLICY" ], false);
+
}
symbol handlePolicy(string key, map event) {
@@ -289,7 +288,7 @@
void initModifyResolvPolicy (string key){
y2milestone("initModifyResolvPolicy");
-
+ //first initialize correctly
if(DNS::resolv_conf_policy == nil || DNS::resolv_conf_policy == "")
{
UI::ChangeWidget(`id("MODIFY_RESOLV"), `Value, `id(`nomodify) );
@@ -302,7 +301,8 @@
{
UI::ChangeWidget(`id("MODIFY_RESOLV"), `Value, `id(`custom) );
}
- if (disableItemsIfNM([], false)) UI::ChangeWidget(`id("MODIFY_RESOLV"), `Enabled, false);
+ //then disable if needed
+ disableItemsIfNM(["MODIFY_RESOLV"], false);
}
symbol handleModifyResolvPolicy (string key, map event){
@@ -326,15 +326,18 @@
void initHostnameGlobal(string key){
// NetworkService::IsManaged () not: #169858, #156830
- has_dhcp = Lan::AnyDHCPDevice ();
+ has_dhcp = Lan::AnyDHCPDevice ();
hn_settings = InitSettings ();
foreach(string key, (list<string>)Map::Keys(hn_settings),{
- InitHnWidget(key);
+ InitHnWidget(key);
});
+ //disable those if NM is in charge
+ disableItemsIfNM(
+ [ "NAMESERVER_1", "NAMESERVER_2", "NAMESERVER_3", "SEARCHLIST_S"],
+ false
+ );
- // TODO make checkbox instead of popup
- // resolver_modifiable = ModifyResolvConfPopup ();
}
void storeHostnameGlobal(string key, map event){
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.17.60/VERSION new/yast2-network-2.17.61/VERSION
--- old/yast2-network-2.17.60/VERSION 2008-11-28 16:50:55.000000000 +0100
+++ new/yast2-network-2.17.61/VERSION 2008-12-04 14:45:38.000000000 +0100
@@ -1 +1 @@
-2.17.60
+2.17.61
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org