Author: locilka Date: Tue Jul 8 11:34:31 2008 New Revision: 48909 URL: http://svn.opensuse.org/viewcvs/yast?rev=48909&view=rev Log: - By default, firewall packages are just checked whether they are installed. CWM Firewall Interfaces does not offer to install them (bnc #388773). - 2.17.6 Modified: trunk/yast2/VERSION trunk/yast2/library/network/src/CWMFirewallInterfaces.ycp trunk/yast2/library/network/src/SuSEFirewall.ycp trunk/yast2/package/yast2.changes Modified: trunk/yast2/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/VERSION?rev=48909&r1=48908&r2=48909&view=diff ============================================================================== --- trunk/yast2/VERSION (original) +++ trunk/yast2/VERSION Tue Jul 8 11:34:31 2008 @@ -1 +1 @@ -2.17.5 +2.17.6 Modified: trunk/yast2/library/network/src/CWMFirewallInterfaces.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/network/src/CWMFirewallInterfaces.ycp?rev=48909&r1=48908&r2=48909&view=diff ============================================================================== --- trunk/yast2/library/network/src/CWMFirewallInterfaces.ycp (original) +++ trunk/yast2/library/network/src/CWMFirewallInterfaces.ycp Tue Jul 8 11:34:31 2008 @@ -96,7 +96,11 @@ */ void SetFirewallLabel (symbol status) { string label = ""; - if (status == `off) + if (status == `not_installed) { + // label + label = _("Firewall package is not installed"); + } + else if (status == `off) { // label label = _("Firewall is disabled"); @@ -203,7 +207,9 @@ InitAllInterfacesList (); symbol status = `custom; - if (! SuSEFirewall::GetEnableService()) + if (! SuSEFirewall::SuSEFirewallIsInstalled()) + status = `not_installed; + else if (! SuSEFirewall::GetEnableService()) status = `off; else if (size (all_interfaces) == 0) status = `no_ifaces; Modified: trunk/yast2/library/network/src/SuSEFirewall.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/network/src/SuSEFirewall.ycp?rev=48909&r1=48908&r2=48909&view=diff ============================================================================== --- trunk/yast2/library/network/src/SuSEFirewall.ycp (original) +++ trunk/yast2/library/network/src/SuSEFirewall.ycp Tue Jul 8 11:34:31 2008 @@ -26,7 +26,7 @@ import "PortRanges"; import "PackageSystem"; - # <!-- SuSEFirewall VARIABLES //--> + // <!-- SuSEFirewall VARIABLES //--> string susefirewall_package = "SuSEfirewall2"; @@ -153,9 +153,9 @@ // FATE #300970: Firewall support for SMB browsing string broadcast_related_module = "nf_conntrack_netbios_ns"; - # <!-- SuSEFirewall VARIABLES //--> + // <!-- SuSEFirewall VARIABLES //--> - # <!-- SuSEFirewall GLOBAL FUNCTIONS USED BY LOCAL ONES //--> + // <!-- SuSEFirewall GLOBAL FUNCTIONS USED BY LOCAL ONES //--> /** * Function sets internal variable, which indicates, that any @@ -215,9 +215,9 @@ } } - # <!-- SuSEFirewall GLOBAL FUNCTIONS USED BY LOCAL ONES //--> + // <!-- SuSEFirewall GLOBAL FUNCTIONS USED BY LOCAL ONES //--> - # <!-- SuSEFirewall LOCAL FUNCTIONS //--> + // <!-- SuSEFirewall LOCAL FUNCTIONS //--> /** * Function returns whether the feature 'any' network interface is supported in the @@ -931,9 +931,35 @@ } } - # <!-- SuSEFirewall LOCAL FUNCTIONS //--> + // <!-- SuSEFirewall LOCAL FUNCTIONS //--> - # <!-- SuSEFirewall GLOBAL FUNCTIONS //--> + // <!-- SuSEFirewall GLOBAL FUNCTIONS //--> + + // bnc #388773 + // By default needed packages are just checked, not installed + boolean check_and_install_package = false; + + /** + * By default SuSEfirewall2 packages are just checked whether they are installed. + * With this function, you can change the behavior to also offer installing + * the packages. + * + * @param boolean new_status, 'true' if packages should be offered for installation + */ + global void SetInstallPackagesIfMissing (boolean new_status) { + if (new_status == nil) { + y2error ("Wrong value: %1", new_status); + return; + } + + check_and_install_package = new_status; + + if (check_and_install_package) { + y2milestone ("SuSEfirewall2 packages will installed if missing"); + } else { + y2milestone ("SuSEfirewall2 packages will not be installed even if missing"); + } + } /* Are needed packages (SuSEfirewall2) installed? */ boolean needed_packages_installed = nil; @@ -946,7 +972,8 @@ global boolean SuSEFirewallIsInstalled () { if (needed_packages_installed == nil) { // In mode normal, package can be installed on request - if (Mode::normal()) { + // if required by the module + if (check_and_install_package && Mode::normal()) { needed_packages_installed = PackageSystem::CheckAndInstallPackages ([susefirewall_package]); y2milestone ("CheckAndInstallPackages -> %1", needed_packages_installed); // In mode install/update network might be down @@ -3287,7 +3314,7 @@ } } - # <!-- SuSEFirewall GLOBAL FUNCTIONS //--> + // <!-- SuSEFirewall GLOBAL FUNCTIONS //--> /* EOF */ } Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=48909&r1=48908&r2=48909&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Tue Jul 8 11:34:31 2008 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Tue Jul 8 11:28:39 CEST 2008 - locilka@suse.cz + +- By default, firewall packages are just checked whether they are + installed. CWM Firewall Interfaces does not offer to install them + (bnc #388773). +- 2.17.6 + +------------------------------------------------------------------- Mon Jul 7 17:05:37 CEST 2008 - locilka@suse.cz - Dropped deprecated functions from Wizard module: -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org