Author: mzugec Date: Mon Oct 27 12:41:43 2008 New Revision: 52565 URL: http://svn.opensuse.org/viewcvs/yast?rev=52565&view=rev Log: - during installation export sysconfig network settings into NetworkManager - on running system disable lan UI for NM (bnc#433084) Modified: trunk/network/VERSION trunk/network/package/yast2-network.changes trunk/network/src/lan/complex.ycp trunk/network/src/modules/Lan.ycp trunk/network/src/routines/routines.ycp trunk/network/src/services/dns.ycp trunk/network/src/services/routing.ycp Modified: trunk/network/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/VERSION?rev=52565&r1=52564&r2=52565&view=diff ============================================================================== --- trunk/network/VERSION (original) +++ trunk/network/VERSION Mon Oct 27 12:41:43 2008 @@ -1 +1 @@ -2.17.45 +2.17.46 Modified: trunk/network/package/yast2-network.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/package/yast2-network.changes?rev=52565&r1=52564&r2=52565&view=diff ============================================================================== --- trunk/network/package/yast2-network.changes (original) +++ trunk/network/package/yast2-network.changes Mon Oct 27 12:41:43 2008 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Mon Oct 27 12:37:38 CET 2008 - mzugec@suse.cz + +- during installation export sysconfig network settings +into NetworkManager +- on running system disable lan UI for NM (bnc#433084) +- 2.17.46 + +------------------------------------------------------------------- Fri Oct 24 13:00:29 CEST 2008 - mzugec@suse.de - don't propose bridged network in DomU (bnc#437628) Modified: trunk/network/src/lan/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/lan/complex.ycp?rev=52565&r1=52564&r2=52565&view=diff ============================================================================== --- trunk/network/src/lan/complex.ycp (original) +++ trunk/network/src/lan/complex.ycp Mon Oct 27 12:41:43 2008 @@ -250,7 +250,8 @@ }); UI::ChangeWidget (`id (`_hw_items), `Items, term_items); - enableDisableButtons(); + if (!disableItemsIfNM([`_hw_items, `_hw_sum, `add, `edit, `delete], true)) + enableDisableButtons(); y2milestone("LanItems %1", LanItems::Items); } @@ -258,7 +259,8 @@ symbol handleOverview( string key, map event ) { - enableDisableButtons(); + if (!disableItemsIfNM([`_hw_items, `_hw_sum, `add, `edit, `delete], false)) + enableDisableButtons(); UI::ChangeWidget(`_hw_sum, `Value,LanItems::GetItemDescription()); if (event["EventReason"]:"" == "Activated") Modified: trunk/network/src/modules/Lan.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/Lan.ycp?rev=52565&r1=52564&r2=52565&view=diff ============================================================================== --- trunk/network/src/modules/Lan.ycp (original) +++ trunk/network/src/modules/Lan.ycp Mon Oct 27 12:41:43 2008 @@ -435,6 +435,9 @@ /* 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")); + // For ssh/vnc installation don't reload/restart network because possibility of IP change (bnc#347482) if (Stage::cont() && (Linuxrc::usessh() || Linuxrc::vnc())) y2milestone("For ssh or vnc installation don't reload/restart network during installation."); else if (LanItems::force_restart) Service::Restart("network"); Modified: trunk/network/src/routines/routines.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/routines/routines.ycp?rev=52565&r1=52564&r2=52565&view=diff ============================================================================== --- trunk/network/src/routines/routines.ycp (original) +++ trunk/network/src/routines/routines.ycp Mon Oct 27 12:41:43 2008 @@ -23,6 +23,8 @@ import "Map"; import "DefaultDesktop"; import "Netmask"; +import "Mode"; + /** * Abort function @@ -805,5 +807,24 @@ return valid_mask; } + +/** + * Check if we're running in "normal" stage with NM + * see bnc#433084 + * if listed any items, disable them, if show_popup, show warning popup + */ + +boolean disableItemsIfNM(list<symbol> items, boolean show_popup){ + boolean disable=true; + if (Mode::normal() && NetworkService::IsManaged()){ + foreach(symbol w, items, { + UI::ChangeWidget(w, `Enabled, false); + }); + if (show_popup) Popup::Warning(_("This configuration is not compatible with NetworkManager. +Use nm-settings applet or switch to Traditional Method with ifup ")); + } else disable=false; + return disable; +} + /* EOF */ } Modified: trunk/network/src/services/dns.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/services/dns.ycp?rev=52565&r1=52564&r2=52565&view=diff ============================================================================== --- trunk/network/src/services/dns.ycp (original) +++ trunk/network/src/services/dns.ycp Mon Oct 27 12:41:43 2008 @@ -122,6 +122,7 @@ 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); } @@ -144,8 +145,9 @@ * @return nil so that the dialog loops on */ define void InitDhcpHostname (string key) { - UI::ChangeWidget (`id("DHCP_HOSTNAME"), `Enabled, has_dhcp); - if (!has_dhcp) UI::ReplaceWidget(`id ("dh_host_text"),`Label(_("No interface with dhcp"))); + if (!disableItemsIfNM([], false)) + 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); return nil; @@ -159,6 +161,7 @@ * @return nil so that the dialog loops on */ define symbol HandleResolverData (string key, map event) { + if (!disableItemsIfNM([], false)) UI::ChangeWidget (`id (key), `Enabled, resolver_modifiable); return nil; } @@ -243,8 +246,8 @@ void initPolicy(string key) { - y2milestone("initPolicy: %1", UI::QueryWidget(`id("MODIFY_RESOLV"), `Value)); - + y2milestone("initPolicy: %1", UI::QueryWidget(`id("MODIFY_RESOLV"), `Value)); + if (!disableItemsIfNM([], false)){ if(UI::QueryWidget(`id("MODIFY_RESOLV"), `Value) == `custom) { UI::ChangeWidget(`id("PLAIN_POLICY"), `Enabled, true); @@ -258,6 +261,10 @@ 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); + } } symbol handlePolicy(string key, map event) { @@ -294,6 +301,7 @@ { UI::ChangeWidget(`id("MODIFY_RESOLV"), `Value, `id(`custom) ); } + if (disableItemsIfNM([], false)) UI::ChangeWidget(`id("MODIFY_RESOLV"), `Enabled, false); } symbol handleModifyResolvPolicy (string key, map event){ @@ -392,27 +400,27 @@ "help": help["write_hostname"]:"", ], "MODIFY_RESOLV" : $[ - "widget": `combobox, - "label": _("&Modify DNS configuration"), - "opt" : [`notify], - "items": [ [`nomodify, _("Only Manually")], - [`auto, _("Use Default Policy")], - [`custom, _("Use Custom Policy")] ], - "init" : initModifyResolvPolicy, - "handle": handleModifyResolvPolicy, - "help" : help["dns_config_policy"]:"", - ], + "widget": `combobox, + "label": _("&Modify DNS configuration"), + "opt" : [`notify], + "items": [ [`nomodify, _("Only Manually")], + [`auto, _("Use Default Policy")], + [`custom, _("Use Custom Policy")] ], + "init" : initModifyResolvPolicy, + "handle": handleModifyResolvPolicy, + "help" : help["dns_config_policy"]:"", + ], "PLAIN_POLICY" : $[ - "widget": `combobox, - "label": _("&Custom Policy Rule"), - "opt" : [`editable], - "items" : [ [`static, "STATIC"], - [`static_fallback, "STATIC_FALLBACK" ] - ], - "init": initPolicy, - "handle": handlePolicy, - "help" : "" - ], + "widget": `combobox, + "label": _("&Custom Policy Rule"), + "opt" : [`editable], + "items" : [ [`static, "STATIC"], + [`static_fallback, "STATIC_FALLBACK" ] + ], + "init": initPolicy, + "handle": handlePolicy, + "help" : "" + ], "NAMESERVER_1": $[ "widget": `textentry, /* textentry label */ Modified: trunk/network/src/services/routing.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/services/routing.ycp?rev=52565&r1=52564&r2=52565&view=diff ============================================================================== --- trunk/network/src/services/routing.ycp (original) +++ trunk/network/src/services/routing.ycp Mon Oct 27 12:41:43 2008 @@ -43,7 +43,7 @@ `VBox( /* TextEntry label */ `HBox( - `TextEntry(`id(`destination), _("&Destination"), entry[1]:""), + `InputField(`id(`destination), `opt(`hstretch), _("&Destination"), entry[1]:""), `ComboBox(`id(`device), `opt(`editable, `hstretch), _("De&vice"), devs) ), `HBox( @@ -82,6 +82,7 @@ any ret = nil; term route = nil; + while(true) { route = nil; ret = UI::UserInput(); @@ -186,6 +187,7 @@ // fixed bug #73739 - if dhcp is used, dont set default gw statically // if (Lan::bootproto == "dhcp")UI::ChangeWidget(`id(`gw),`Enabled, false); + disableItemsIfNM([ `gw, `table, `add, `edit, `delete ], true); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org