Hello community,
here is the log from the commit of package yast2 for openSUSE:Factory
checked in at Fri Mar 5 02:19:24 CET 2010.
--------
--- yast2/yast2.changes 2010-01-18 14:45:38.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2/yast2.changes 2010-03-03 23:26:57.000000000 +0100
@@ -1,0 +2,35 @@
+Wed Mar 3 23:08:31 CET 2010 - jsuchome@suse.cz
+
+- SERVICES.pm: added support for enabling/disabling service
+- 2.19.7
+
+-------------------------------------------------------------------
+Wed Feb 17 10:09:00 CET 2010 - jsrain@suse.cz
+
+- do not save unmodified interfaces (fate#308978)
+
+-------------------------------------------------------------------
+Thu Feb 11 16:10:40 CET 2010 - juhliarik@suse.cz
+
+- added fix for deleting splash from initrd (bnc#292013)
+
+-------------------------------------------------------------------
+Mon Feb 8 16:13:49 CET 2010 - locilka@suse.cz
+
+- Fixed SuSEFirewall::ActivateConfiguration to return a boolean
+ value in all scenarios (BNC #577932).
+
+-------------------------------------------------------------------
+Mon Feb 8 15:23:54 CET 2010 - locilka@suse.cz
+
+- Showing also zone of interface for 'Open Port in Firewall'
+ details (BNC #483455).
+- 2.19.6
+
+-------------------------------------------------------------------
+Tue Feb 2 17:20:29 CET 2010 - locilka@suse.cz
+
+- Fixed generating unique step IDs for Wizard too keep the same
+ durign one YaST run (BNC #575092).
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-2.19.5.tar.bz2
New:
----
yast2-2.19.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.H16qio/_old 2010-03-05 02:19:14.000000000 +0100
+++ /var/tmp/diff_new_pack.H16qio/_new 2010-03-05 02:19:14.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2 (Version 2.19.5)
+# spec file for package yast2 (Version 2.19.7)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,24 +19,31 @@
Name: yast2
-Version: 2.19.5
+Version: 2.19.7
Release: 1
+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-2.19.5.tar.bz2
+Source0: yast2-2.19.7.tar.bz2
+
Prefix: /usr
+
Group: System/YaST
License: GPLv2+
Source1: yast2-rpmlintrc
+
BuildRequires: perl-XML-Writer update-desktop-files yast2-devtools yast2-perl-bindings yast2-testsuite
# Needed already in build time
BuildRequires: yast2-core >= 2.18.12 yast2-pkg-bindings >= 2.17.32 yast2-ycp-ui-bindings >= 2.18.4
+
# pre-requires for filling the sysconfig template (sysconfig.yast2)
PreReq: %fillup_prereq
+
# float::tolstring builtin
Requires: yast2-core >= 2.18.12
# Mod_UI
# new UI::OpenContextMenu
Requires: yast2-ycp-ui-bindings >= 2.18.4
+
# Pkg::Get(Set)SolverFlags()
Requires: yast2-pkg-bindings >= 2.17.32
Requires: yast2_ui yast2-branding
@@ -54,6 +61,7 @@
Requires: gpg2
# xdg-su in .desktops
Recommends: xdg-utils
+
# moved cfg_security.scr
Conflicts: yast2-security <= 2.13.2
# moved ag_netd, cfg_netd.scr, cfg_xinetd.scr
@@ -63,10 +71,13 @@
Conflicts: yast2-storage < 2.16.4
Conflicts: yast2-network < 2.16.6
Conflicts: yast2-sshd < 2.16.1
+
# moved ag_content agent
Conflicts: yast2-instserver <= 2.16.3
+
# InstError
Conflicts: yast2-installation < 2.18.5
+
Conflicts: yast2-update < 2.16.1
# Modules 'Slides' and 'SlideShow' moved from yast2-packager to yast2
Conflicts: yast2-packager < 2.17.12
@@ -76,12 +87,14 @@
Conflicts: yast2-country < 2.16.3
# DnsServerAPI moved to yast2.rpm (by mzugec)
Conflicts: yast2-dns-server < 2.17.0
+
Provides: yast2-lib-sequencer
Obsoletes: yast2-lib-sequencer
Provides: yast2-lib-wizard yast2-lib-wizard-devel yast2-trans-wizard
Obsoletes: yast2-lib-wizard yast2-lib-wizard-devel yast2-trans-wizard
Provides: yast2-trans-menu y2t_menu
Obsoletes: yast2-trans-menu y2t_menu
+
# moved here from another packages
Provides: yast2-installation:/usr/share/YaST2/modules/Installation.ycp
Provides: yast2-installation:/usr/share/YaST2/modules/Product.ycp
@@ -91,6 +104,7 @@
Provides: yast2-packager:/usr/lib/YaST2/servers_non_y2/ag_anyxml
Provides: yast2-dns-server:/usr/share/YaST2/modules/DnsServerAPI.pm
Provides: yast2-mail-aliases
+
Summary: YaST2 - Main Package
%description
@@ -106,6 +120,7 @@
Obsoletes: yast2-devel
Provides: yast2-devel
Requires: yast2-core-devel
+
Summary: YaST2 - Development Scripts and Documentation
%description devel-doc
@@ -113,19 +128,22 @@
installation with YaST2.
%prep
-%setup -n yast2-2.19.5
+%setup -n yast2-2.19.7
%build
%{prefix}/bin/y2tool y2autoconf
%{prefix}/bin/y2tool y2automake
autoreconf --force --install
+
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
+
%{?suse_update_config:%{suse_update_config -f}}
./configure --libdir=%{_libdir} --prefix=%{prefix} --mandir=%{_mandir}
# V=1: verbose build in case we used AM_SILENT_RULES(yes)
# so that RPM_OPT_FLAGS check works
make %{?jobs:-j%jobs} V=1
+
# removed explicit adding of translations to group desktop files, since it is covered by the general call (they are in a subdirectory) and it caused build fail
%install
@@ -135,6 +153,7 @@
d=${f##*/}
%suse_update_desktop_file -d ycc_${d%.desktop} ${d%.desktop}
done
+
mkdir -p "$RPM_BUILD_ROOT"/usr/share/YaST2/clients
mkdir -p "$RPM_BUILD_ROOT"%{prefix}/share/applications/YaST2
mkdir -p "$RPM_BUILD_ROOT"/usr/share/YaST2/images
@@ -157,7 +176,9 @@
%files
%defattr(-,root,root)
+
# basic directory structure
+
%dir /usr/share/YaST2/clients
%dir %{prefix}/share/applications/YaST2
%{prefix}/share/applications/YaST2/groups
@@ -176,7 +197,9 @@
%dir /usr/share/YaST2/schema/autoyast
%dir /usr/share/YaST2/schema/autoyast/rnc
%dir /etc/YaST2
+
# yast2
+
/usr/share/YaST2/data/*.ycp
/usr/share/YaST2/clients/*
/usr/share/YaST2/modules/*
@@ -187,25 +210,32 @@
/etc/bash_completion.d/yast2*.sh
/etc/YaST2/XVersion
/var/adm/fillup-templates/sysconfig.yast2
+
# documentation (not included in devel subpackage)
%doc %dir %{prefix}/share/doc/packages/yast2
%doc %{prefix}/share/doc/packages/yast2/COPYING
%doc %{prefix}/share/doc/packages/yast2/README
%doc %{_mandir}/*/*
+
/sbin/*
+
# wizard
%dir /usr/share/YaST2/include/wizard
/usr/share/YaST2/include/wizard/*.ycp
+
#packags
%dir /usr/share/YaST2/include/packages
/usr/share/YaST2/include/packages/*.ycp
+
#system
%dir /usr/share/YaST2/include/hwinfo
/usr/share/YaST2/include/hwinfo/*.ycp
+
# documentation
%files devel-doc
%defattr(-,root,root)
+
%doc %{prefix}/share/doc/packages/yast2/autodocs
%doc %{prefix}/share/doc/packages/yast2/commandline
%doc %{prefix}/share/doc/packages/yast2/control
++++++ yast2-2.19.5.tar.bz2 -> yast2-2.19.7.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.19.5/VERSION new/yast2-2.19.7/VERSION
--- old/yast2-2.19.5/VERSION 2010-01-18 14:38:55.000000000 +0100
+++ new/yast2-2.19.7/VERSION 2010-03-03 23:09:50.000000000 +0100
@@ -1 +1 @@
-2.19.5
+2.19.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.19.5/library/control/src/ProductControl.ycp new/yast2-2.19.7/library/control/src/ProductControl.ycp
--- old/yast2-2.19.5/library/control/src/ProductControl.ycp 2009-09-07 15:16:03.000000000 +0200
+++ new/yast2-2.19.7/library/control/src/ProductControl.ycp 2010-02-08 08:07:43.000000000 +0100
@@ -7,7 +7,7 @@
* Jiri Srain
* Lukas Ocilka
*
- * $Id: ProductControl.ycp 58536 2009-09-04 16:25:35Z kmachalkova $
+ * $Id: ProductControl.ycp 60665 2010-02-02 16:24:29Z locilka $
*/
{
textdomain "base";
@@ -348,7 +348,7 @@
*/
global define boolean checkArch(map mod , map def)
{
- y2milestone("mod: %1", mod);
+ y2debug ("Checking architecture: %1", mod);
string archs = mod["archs"]:"";
if (archs == "")
{
@@ -609,9 +609,18 @@
map workflow = FindMatchingWorkflow (stage, mode);
list<map> modules = workflow["modules"]:[];
- y2debug ("modules: %1", modules );
+ y2debug ("M1: %1", modules);
+ // Unique IDs have to always keep the same because some steps
+ // can be disabled while YaST is running
+ // @see BNC #575092
integer id = 1;
+ modules = maplist (map m, modules, ``{
+ m["id"] = sformat("%1_%2", stage, id);
+ id = id + 1;
+ return m;
+ });
+
if (which == `enabled)
{
modules = filter (map m, modules, {
@@ -619,13 +628,14 @@
});
}
+ y2debug ("M2: %1", modules);
+
modules = maplist(map m, modules, ``{
- m["id"] = sformat("%1_%2", stage, id);
- PrepareScripts(m);
- id = id + 1;
- return (m);
- });
+ PrepareScripts(m);
+ return m;
+ });
+ y2debug ("M3: %1", modules);
y2debug("Log files: %1", logfiles);
return modules;
}
@@ -858,6 +868,7 @@
if (debug_workflow == true) {
label = label + sformat (" [%1]", m["name"]:"");
}
+ y2debug ("AddStep: %1/%2", label, id);
UI::WizardCommand (`AddStep (label, id));
}
});
@@ -1267,6 +1278,8 @@
while ((current_step >= 0) && (current_step < size(modules)))
{
map step = modules[current_step]:$[];
+ y2milestone ("Current step: %1", step);
+
string step_name = step["name"]:"";
// BNC #401319
// if "execute" is defined, it's called without modifications
@@ -1316,12 +1329,15 @@
current_step = current_step + 1;
}
else
+ {
current_step = current_step - 1;
+ }
}
+ // Continue in 'while' means 'next step'
if ( do_continue ) continue;
term argterm = getClientTerm( step, defaults, former_result);
- y2debug("Running module: %1 (%2)", argterm, current_step);
+ y2milestone ("Running module: %1 (%2)", argterm, current_step);
symbol module_name = symbolof( argterm );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.19.5/library/modules/Version.ycp new/yast2-2.19.7/library/modules/Version.ycp
--- old/yast2-2.19.5/library/modules/Version.ycp 2010-01-18 14:40:55.000000000 +0100
+++ new/yast2-2.19.7/library/modules/Version.ycp 2010-03-03 23:11:16.000000000 +0100
@@ -20,7 +20,7 @@
/**
* Version of the yast2 package
*/
-global string yast2 = "2.19.5";
+global string yast2 = "2.19.7";
/* EOF */
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.19.5/library/network/src/CWMFirewallInterfaces.ycp new/yast2-2.19.7/library/network/src/CWMFirewallInterfaces.ycp
--- old/yast2-2.19.5/library/network/src/CWMFirewallInterfaces.ycp 2008-12-18 14:46:52.000000000 +0100
+++ new/yast2-2.19.7/library/network/src/CWMFirewallInterfaces.ycp 2010-02-08 16:27:36.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Routines for selecting interfaces opened in firewall
* Authors: Jiri Srain
*
- * $Id: CWMFirewallInterfaces.ycp 51569 2008-09-26 10:17:48Z locilka $
+ * $Id: CWMFirewallInterfaces.ycp 60734 2010-02-08 14:26:10Z locilka $
*
* WARNING: If you want to use this functionality of this module
* you should allways call 'SuSEFirewall::Read()' in the
@@ -153,6 +153,18 @@
interface_items = maplist (string i, all_interfaces, {
string label = NetworkInterfaces::GetValue (i, "BOOTPROTO");
string ipaddr = NetworkInterfaces::GetValue (i, "IPADDR");
+
+ // BNC #483455: Interface zone name
+ string zone = SuSEFirewall::GetZoneOfInterface (i);
+ if (zone != nil && zone != "")
+ {
+ zone = SuSEFirewall::GetZoneFullName (zone);
+ }
+ else
+ {
+ zone = _("Interface is not assigned to any zone");
+ }
+
if (label == "static" || label == "" || label == nil)
{
label = ipaddr;
@@ -163,14 +175,16 @@
if (ipaddr != nil && ipaddr != "")
label = sformat ("%1/%2", label, ipaddr);
}
+
if (label == nil || label == "")
{
label = i;
}
else
{
- label = sformat ("%1 (%2)", i, label);
+ label = sformat ("%1 (%2 / %3)", i, label, zone);
}
+
return `item (`id (i), label);
});
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.19.5/library/network/src/NetworkInterfaces.ycp new/yast2-2.19.7/library/network/src/NetworkInterfaces.ycp
--- old/yast2-2.19.5/library/network/src/NetworkInterfaces.ycp 2009-02-27 12:24:08.000000000 +0100
+++ new/yast2-2.19.7/library/network/src/NetworkInterfaces.ycp 2010-02-22 08:41:53.000000000 +0100
@@ -712,6 +712,8 @@
/* write all devices */
maplist(string typ, map > devsmap, (map > >) Devs, {
maplist(string config, map devmap, devsmap, {
+ if (devmap == OriginalDevs[typ,config]:$[])
+ return;
/* write sysconfig */
string p = ".network.value.\"" + config + "\".";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.19.5/library/network/src/SuSEFirewall.ycp new/yast2-2.19.7/library/network/src/SuSEFirewall.ycp
--- old/yast2-2.19.5/library/network/src/SuSEFirewall.ycp 2008-12-18 14:46:52.000000000 +0100
+++ new/yast2-2.19.7/library/network/src/SuSEFirewall.ycp 2010-02-08 16:27:36.000000000 +0100
@@ -6,7 +6,7 @@
* Summary: Interface manipulation of /etc/sysconfig/SuSEFirewall
* Authors: Lukas Ocilka
*
- * $Id: SuSEFirewall.ycp 51569 2008-09-26 10:17:48Z locilka $
+ * $Id: SuSEFirewall.ycp 60742 2010-02-08 15:18:49Z locilka $
*
* Module for handling SuSEfirewall2.
*/
@@ -2450,6 +2450,7 @@
// not modified - skip restart
} else {
y2milestone("Configuration hasn't modified, skipping restarting services");
+ return true;
}
}
// Firewall should stop after Write()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.19.5/library/runlevel/src/YaPI/SERVICES.pm new/yast2-2.19.7/library/runlevel/src/YaPI/SERVICES.pm
--- old/yast2-2.19.5/library/runlevel/src/YaPI/SERVICES.pm 2010-01-18 14:04:30.000000000 +0100
+++ new/yast2-2.19.7/library/runlevel/src/YaPI/SERVICES.pm 2010-03-03 23:06:42.000000000 +0100
@@ -21,6 +21,21 @@
my $error_message = "";
+# check for key presence in given list
+sub contains {
+ my ( $list, $key, $ignorecase ) = @_;
+ if ( $ignorecase ) {
+ if ( grep /^$key$/i, @{$list} ) {
+ return 1;
+ }
+ } else {
+ if ( grep /^$key$/, @{$list} ) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
# log error message and fill it into $error_message variable
sub report_error {
$error_message = shift;
@@ -65,9 +80,20 @@
my $services = parse_custom_services ();
foreach my $name (keys %$services) {
my $s = {
- "name" => $name,
- "description" => $services->{$name}{"description"} || ""
+ "name" => $name
};
+ $s->{"description"} = ($services->{$name}{"description"} || "") if $args->{"description"} || 0;
+ $s->{"shortdescription"}= ($services->{$name}{"shortdescription"} || "") if $args->{"shortdescription"} || 0;
+
+ # read list of available commands, it may be limited for 'custom service'
+ my @commands = ();
+ foreach my $key (keys %{$services->{$name}}) {
+ if (contains (["start","stop","restart","reload","try-restart"], $key, 1)) {
+ push @commands, $key;
+ }
+ }
+ $s->{"commands"} = \@commands;
+
if ($args->{"read_status"} || 0)
{
my $cmd = $services->{$name}{"status"};
@@ -78,6 +104,7 @@
my $out = SCR->Execute (".target.bash_output", $cmd);
$s->{"status"} = $out->{"exit"};
}
+
push @ret, $s;
}
return \@ret;
@@ -113,13 +140,19 @@
return $ret;
}
-# Return the map of services enabled in given runlevel
+# Return the list of services enabled in given runlevel, or even all available.
+#
# Parameter is an argument map with possible keys:
-# "runlevel" : integer
-# "read_status" : if true, service status will be queried
-# "custom" : if true, custom services (defined in config file) will be read
+# "service" : if defined, only the status of _this given service_ will be returned (= list with one item)
+# "runlevel" : integer; if not defined, current runlevel will be used
+# "read_status" : if true, service status will be queried and returned for each service
+# "custom" : if true, custom services (defined in config file) will be read (otherwise list of init.d services)
# "description" : if true, read the description of each service
-# "service" : if defined, the status of this given service will be returned
+# "only_enabled" : if true, return only list of services enabled in given runlevel
+# - neither "start_runlevels", nor "enabled" key will be part of resulting maps
+# "start_runlevels" if true, each service's result map will contain list of runlevels where it is started
+# - if not present (or false), "enabled" key with boolean value will be returned instead
+# "filter" : list of strings; defines filtered list of services that should be returned
# @returns array of hashes
BEGIN{$TYPEINFO{Read} = ["function",
["list", [ "map", "string", "any"]],
@@ -130,9 +163,16 @@
my $self = shift;
my $args = shift;
my @ret = ();
- my $runlevel = 5;
+ my $runlevel = SCR->Read (".init.scripts.current_runlevel");
$runlevel = $args->{"runlevel"} if defined $args->{"runlevel"};
+ my @filter = ();
+ @filter = @{$args->{"filter"}} if defined $args->{"filter"};
+ my $filter_map= {};
+ foreach my $s (@filter) {
+ $filter_map->{$s} = 1;
+ }
+
# only read status of one service if the name was given
if ($args->{"service"} || "") {
my $exec = $self->Execute ({
@@ -148,22 +188,58 @@
return \@ret;
}
+ # read only custom services
if ($args->{"custom"} || 0) {
return read_custom_services ($args);
}
- foreach my $name (@{Service->EnabledServices ($runlevel)}) {
- my $s = {
- "name" => $name
- };
- $s->{"status"} = Service->Status ($name) if ($args->{"read_status"} || 0);
- if (($args->{"description"} || 0) || ($args->{"shortdescription"} || 0)) {
- my $info = Service->Info ($name);
+ if ($args->{"only_enabled"}) {
+ # generate the output list
+ foreach my $name (@{Service->EnabledServices ($runlevel)}) {
+ next if (@filter && !defined $filter_map->{$name}); # should not be returned
+ my $s = {
+ "name" => $name,
+ };
+ $s->{"status"} = Service->Status ($name) if ($args->{"read_status"} || 0);
+ if (($args->{"description"} || 0) || ($args->{"shortdescription"} || 0)) {
+ my $info = Service->Info ($name);
+ $s->{"description"} = ($info->{"description"} || "") if $args->{"description"} || 0;
+ $s->{"shortdescription"}= ($info->{"shortdescription"} || "") if $args->{"shortdescription"} || 0;
+ }
+ push @ret, $s;
+ }
+ }
+ else {
+ my $details = SCR->Read (".init.scripts.runlevels");
+
+ # copied from RunlevelEd::Read
+ my $full_services = SCR->Read (".init.scripts.comments");
+ while (my ($name, $info) = each %$full_services) {
+
+ next if (@filter && !defined $filter_map->{$name}); # should not be returned
+
+ my $second_service = $details->{$name} || {};
+
+ my $s = {
+ "name" => $name
+ };
+ next if (contains ($info->{"defstart"} || [], "B", 1));
+
+ if ($args->{"start_runlevels"} || 0) {
+ $s->{"start_runlevels"} = $second_service->{"start"} || [];
+ }
+ else {
+ my $start = $second_service->{"start"} || [];
+ # for "B" check, see RunlevelEd::StartContainsImplicitly
+ $s->{"enabled"} = YaST::YCP::Boolean (contains ($start, $runlevel, 1) || contains ($start, "B", 1));
+ }
+ $s->{"status"} = Service->Status ($name) if ($args->{"read_status"} || 0);
$s->{"description"} = ($info->{"description"} || "") if $args->{"description"} || 0;
$s->{"shortdescription"}= ($info->{"shortdescription"} || "") if $args->{"shortdescription"} || 0;
+ push @ret, $s;
}
- push @ret, $s;
}
+
return \@ret;
}
@@ -181,6 +257,15 @@
}
# Executes an action (e.g. "restart") with given service
+# If the action is start or stop, it will also enable (resp. disable)
+# the service for current runlevel.
+#
+# parameter is a map where "name" is service name, "action" means what to do
+# - if "only_execute" key is present, do not continue with enabling/disabling
+# - if action is "enable" or "disable", only enables/disables service
+# - if "custom" key is present (with true value), indicates custom service, which
+# has special handling. Also, custom service will not be enabled/disabled.
+#
# return value is map with "exit", "stdout" and "stderr" keys
BEGIN{$TYPEINFO{Execute} = ["function",
[ "map", "string", "any"],
@@ -194,11 +279,65 @@
my $name = $args->{"name"} || "";
my $action = $args->{"action"} || "";
+ return self->Enable ($args) if ($action eq "enable" || $action eq "disable");
+
if ($args->{"custom"} || 0) {
return execute_custom_script ($name, $action);
}
else {
- return Service->RunInitScriptOutput ($name, $action);
+ my $ret = Service->RunInitScriptOutput ($name, $action);
+ if (($action eq "start" || $action eq "stop") && !($args->{"only_execute"} || 0)) {
+ if (($ret->{"exit"} || 0) ne 0) {
+ y2error ("action '$action' failed");
+ return $ret;
+ }
+ if ($action eq "start") {
+ $args->{"action"} = "enable";
+ }
+ else {
+ $args->{"action"} = "disable";
+ }
+ return $self->Enable ($args);
+ }
+ return $ret;
}
}
+
+# Enable/Disable given service in current runlevel
+# parameter is a map where "name" is service name, "action" means what to do
+# return value is map with "exit", "stdout" and "stderr" keys
+BEGIN{$TYPEINFO{Enable} = ["function",
+ [ "map", "string", "any"],
+ [ "map", "string", "any"]];
+}
+sub Enable {
+
+ my $self = shift;
+ my $args = shift;
+ my $name = $args->{"name"} || "";
+ my $action = $args->{"action"} || "";
+ my $ret = {
+ "stdout" => "",
+ "stderr" => "",
+ "exit" => 0
+ };
+ if ($action eq "enable") {
+ unless (Service->Enable ($name)) {
+ $ret->{"stderr"} = "Failed to enable service $name.";
+ $ret->{"exit"} = 1000;
+ }
+ }
+ elsif ($action eq "disable") {
+ unless (Service->Disable ($name)) {
+ $ret->{"stderr"} = "Failed to disable service $name.";
+ $ret->{"exit"} = 2000;
+ }
+ }
+ else {
+ $ret->{"stderr"} = "Unknown action '$action'";
+ $ret->{"exit"} = 3;
+ }
+ return $ret;
+}
+
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-2.19.5/library/system/src/Initrd.ycp new/yast2-2.19.7/library/system/src/Initrd.ycp
--- old/yast2-2.19.5/library/system/src/Initrd.ycp 2008-12-18 14:46:51.000000000 +0100
+++ new/yast2-2.19.7/library/system/src/Initrd.ycp 2010-02-16 20:58:45.000000000 +0100
@@ -11,7 +11,7 @@
* Authors:
* Jiri Srain
*
- * $Id: Initrd.ycp 50440 2008-08-28 11:39:07Z locilka $
+ * $Id: Initrd.ycp 60801 2010-02-11 15:11:59Z juhliarik $
*
*/
{
@@ -439,16 +439,22 @@
if (! Arch::s390 ())
{
changed = true;
- integer mode = tointeger (vga);
- list<map> all_modes = VgaModes ();
- foreach (map m, all_modes, ``{
- if (m["mode"]:0 == mode
- && m["height"]:0 != 0 && m["width"]:0 != 0)
- {
- splash = sformat ("%2x%1", m["height"]:0, m["width"]:0);
- y2milestone ("Setting splash resolution to %1", splash);
- }
- });
+ // bnc#292013 - Grub-tool does not recreate initrd if the vga-mode changed
+ if (vga == "normal")
+ {
+ splash="off";
+ } else {
+ integer mode = tointeger (vga);
+ list<map> all_modes = VgaModes ();
+ foreach (map m, all_modes, ``{
+ if (m["mode"]:0 == mode
+ && m["height"]:0 != 0 && m["width"]:0 != 0)
+ {
+ splash = sformat ("%2x%1", m["height"]:0, m["width"]:0);
+ }
+ });
+ }
+ y2milestone ("Setting splash resolution to %1", splash);
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org