Mailinglist Archive: yast-commit (870 mails)

< Previous Next >
[yast-commit] r49103 - in /trunk/runlevel: VERSION package/yast2-runlevel.changes src/RunlevelEd.ycp
  • From: locilka@xxxxxxxxxxxxxxxx
  • Date: Tue, 15 Jul 2008 13:54:06 -0000
  • Message-id: <20080715135406.C40B934544@xxxxxxxxxxxxxxxx>
Author: locilka
Date: Tue Jul 15 15:54:06 2008
New Revision: 49103

URL: http://svn.opensuse.org/viewcvs/yast?rev=49103&view=rev
Log:
- Reading control file feature globals->rle_offer_rulevel_4
in RunlevelEd module constructor whether to offer runlevel 4
in UI, default is 'false' if not set (FATE #303798).
- 2.17.1


Modified:
trunk/runlevel/VERSION
trunk/runlevel/package/yast2-runlevel.changes
trunk/runlevel/src/RunlevelEd.ycp

Modified: trunk/runlevel/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/runlevel/VERSION?rev=49103&r1=49102&r2=49103&view=diff
==============================================================================
--- trunk/runlevel/VERSION (original)
+++ trunk/runlevel/VERSION Tue Jul 15 15:54:06 2008
@@ -1 +1 @@
-2.17.0
+2.17.1

Modified: trunk/runlevel/package/yast2-runlevel.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/runlevel/package/yast2-runlevel.changes?rev=49103&r1=49102&r2=49103&view=diff
==============================================================================
--- trunk/runlevel/package/yast2-runlevel.changes (original)
+++ trunk/runlevel/package/yast2-runlevel.changes Tue Jul 15 15:54:06 2008
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Tue Jul 15 15:50:06 CEST 2008 - locilka@xxxxxxx
+
+- Reading control file feature globals->rle_offer_rulevel_4
+ in RunlevelEd module constructor whether to offer runlevel 4
+ in UI, default is 'false' if not set (FATE #303798).
+- 2.17.1
+
+-------------------------------------------------------------------
Thu Jul 10 16:28:52 CEST 2008 - locilka@xxxxxxx

- Adding runlevel 4 as another possible runlevel to select: both

Modified: trunk/runlevel/src/RunlevelEd.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/runlevel/src/RunlevelEd.ycp?rev=49103&r1=49102&r2=49103&view=diff
==============================================================================
--- trunk/runlevel/src/RunlevelEd.ycp (original)
+++ trunk/runlevel/src/RunlevelEd.ycp Tue Jul 15 15:54:06 2008
@@ -23,9 +23,39 @@
import "Summary";
import "Report";
import "CommandLine";
+ import "ProductControl";
+ import "ProductFeatures";

include "runlevel/toposort.ycp";

+ // default value defined in control_file->defaults->rle_offer_rulevel_4
+ boolean offer_runlevel_4 = false;
+
+ /**
+ * Sets whether runlevel 4 should be supported.
+ *
+ * @param boolean new_state (true == supported)
+ * @see FATE #303798
+ */
+ global void SetRunlevel4Support (boolean new_state) {
+ if (new_state == nil) {
+ y2error ("Wrong runlevel4 value");
+ return;
+ }
+
+ offer_runlevel_4 = new_state;
+ y2milestone ("Runlevel 4 support set to: %1", offer_runlevel_4);
+ }
+
+ /**
+ * Returns whether runlevel 4 is supported in RLEd.
+ *
+ * @return boolean supported
+ */
+ global boolean GetRunlevel4Support () {
+ return offer_runlevel_4;
+ }
+
/**
* Proposal parameter: if it changes, we repropose
*/
@@ -152,10 +182,14 @@
runlevels= (list<string>) SCR::Read (.init.scripts.runlevel_list);
if (0 == size (runlevels))
{
- runlevels = ["0", "1", "2", "3", "4", "5", "6", "S", ];
+ if (GetRunlevel4Support()) {
+ runlevels = ["0", "1", "2", "3", "4", "5", "6", "S", ];
+ } else {
+ runlevels = ["0", "1", "2", "3", "5", "6", "S", ];
+ }
}

- if (! contains (runlevels, "4")) {
+ if (GetRunlevel4Support() && ! contains (runlevels, "4")) {
y2milestone ("Adding runlevel 4");
runlevels = sort (add (runlevels, "4"));
}
@@ -595,7 +629,11 @@
runlevels = (list<string>) SCR::Read (.init.scripts.runlevel_list);
if (0 == size (runlevels))
{
- runlevels = ["0", "1", "2", "3", "4", "5", "6", "S", ];
+ if (GetRunlevel4Support()) {
+ runlevels = ["0", "1", "2", "3", "4", "5", "6", "S", ];
+ } else {
+ runlevels = ["0", "1", "2", "3", "5", "6", "S", ];
+ }
}

//..
@@ -933,7 +971,9 @@

if (mode == `auto)
{
- if (! contains (rls, "4")) rls = sort (add (rls, "4"));
+ if (GetRunlevel4Support() && ! contains (rls, "4"))
+ rls = sort (add (rls, "4"));
+
rls = prepend (rls, "");
}
else if (mode == `proposal)
@@ -942,7 +982,11 @@
// inittab in the inst-sys is pre-lsb so we have to override it
//
// "4" added because of FATE #303798
- rls = ["2", "3", "4", "5"];
+ if (GetRunlevel4Support()) {
+ rls = ["2", "3", "4", "5"];
+ } else {
+ rls = ["2", "3", "5"];
+ }
}
y2milestone ("Mode %1 items %2", mode, rls);

@@ -958,5 +1002,26 @@
return items;
}

+ boolean already_initialized = false;

+ /**
+ * Constructor...
+ *
+ * @see FATE #303798: YaST2 runlevel editor: offer easy enablement and
configuration of runlevel 4
+ */
+ global void RunlevelEd () {
+ if (already_initialized)
+ return;
+
+ already_initialized = true;
+
+ boolean supported = ProductFeatures::GetBooleanFeature ("globals",
"rle_offer_rulevel_4");
+
+ if (supported == nil) {
+ y2milestone ("globals/rle_offer_rulevel_4 is missing in control
file, runlevel 4 will not be supported");
+ supported = false;
+ }
+
+ SetRunlevel4Support (supported);
+ }
}

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages