System Services (Runlevel) (formerly known as Runlevel Editor) |
ui.ycp |
Runlevel Editor user interface. | |
|
|
This module has an unstable interface. |
Create term of checkboxes for runlevel selection.
- Return value:
-
HBox full of checkboxes.
Changes value of a runlevel checkbox. Prevents triggering userinput by disabling notify.
- Parameters:
-
service service rl which runlevel
Changes values of runlevel checkboxes.
- Parameters:
-
service service
Update the long description text box
- Parameters:
-
service service
Sets runlevel columns in the table.
- Parameters:
-
service_name which line service service rls which columns to update, nil == all
Returns whether the service is listed in the table of services
- Parameters:
-
service_name
Update run-time status column.
- Parameters:
-
service_name which line started status or -1 (unknown yet)
Helper function for fetching service status in run-time.
- Parameters:
-
service_name which line service service started status or -1 (unknown yet)
Changes values of runlevel checkboxes. Get the status if not known yet.
- Parameters:
-
service
Reads data from checkboxes and updates service and RunlevelEd::services maps.
- Parameters:
-
service_name which service service service
- Return value:
-
service
Get help text for rcscript start|stop command exit value.
- Parameters:
-
exit exit value
- Return value:
-
help text
Get help text for rcscript status return value according to LSB.
- Parameters:
-
exit exit value
- Return value:
-
help text
Returns items for default runlevel combo box. (Excludes 0, 1, 6, S and B)
- Parameters:
-
mode if `auto, adds Unchanged. if `proposal, only 2, 3 and 5
- Return value:
-
List of items. Default is selected.
- Parameters:
-
rll a list of runlevels or nil, meaning "all"
- Return value:
-
"in [these] runlevels" (translated)
- Parameters:
-
started status or -1 (unknown yet)
- Return value:
-
"Yes", "No" or "???"
- Parameters:
-
disabled status started status or -1 (unknown yet)
- Return value:
-
"Yes", "Yes*", "No", "No*" or "???"
Ask if really abort. Uses boolean changed_settings. Sets boolean do_abort_now.
- Return value:
-
true if user really wants to abort
Create table items from services. For simple mode, also filter out critical services: boot ones. For Expert mode: Mixin: started, start, (short)description.
- Parameters:
-
mix which items to mix in: `simple: id=name, name, bstatus, (short)description `complex: id=name, name, rstatus, runlevels, (short)description `auto: id=name, name, dirty, runlevels, ?(short)description
- Return value:
-
List of items for table.
For each service, determines its status and calls a supplied function.
- Parameters:
-
use_func
For specified service, determines its status and calls a supplied function.
- Parameters:
-
use_func service_name
help text for progress
- Return value:
-
help text
Enable or disable a service in some runlevels. Set the variables and update the ui (rl columns).
- Parameters:
-
service_name a service rls which runlevels, nil == disable in all enable enabling or disabling?
Check that all the services exist (in RunlevelEd::services). If not, popup a list of the missing ones and ask whether continue or not. Filter out the missing ones.
- Parameters:
-
services a service list
- Return value:
-
[continue?, filtered list]
Generic function to handle enabling, disabling, starting and
stoping services and their dependencies, in various runlevels.
Piece of cake ;-)
Either of init_time or run_time can be specified (for complex mode) or both (for simple mode).
rls: ignored for -init +run
What it does: gets dependent services (in the correct order), filters ones that are already in the desired state, if there are dependencies left, pop up a confirmation dialog, check for missing dependencies, perform the action (run-time, then init-time) for the deps and the service (in this order), displaying output after each error and at the end.
- Parameters:
-
service_name name of service rls in which run levels, nil == all enable on/off init_time do enable/disable run_time do start/stop
- Return value:
-
success (may have been canceled because of dependencies)
Turns a service on or off in the simple mode, ie. resolving dependencies and for each service doing start,enable or stop,disable.
- Parameters:
-
service_name name of service enable
- Return value:
-
success (may have been canceled because of dependencies)
Used for enabling/disabling a service and services depending on it in a runlevel or a set of runlevels.
- Parameters:
-
service_name name of service rls in which run levels, nil == all enable enable/disable
- Return value:
-
success (may have been canceled because of dependencies)
Used for starting/stopping a service and services depending on it. Displays result popups.
- Parameters:
-
service_name name of service enable start/stop
- Return value:
-
success (may have been canceled because of dependencies)
Starts/stops/checks status of a service
- Parameters:
-
service_name service to start/stop command "start" or "stop" or "status"
- Return value:
-
[integer exit_status, string rich_message]
Prints list items into a string, separating them by commas and when line exceeds len characters, it does line break (\n). It adds 5 spaces before each line. Do not expect reasonable results if you set len < 0.
- Parameters:
-
l list of strings len minimal length of line
- Return value:
-
formated string
Checks what services should run in this runlevel and do not run or what services run but should not run.
- Return value:
-
overview text
Radio buttons (faking tabs) for switching modes
- Parameters:
-
mode `simple or `complex, which one are we in
- Return value:
-
RadioButtonGroup term
help text services dialog
- Return value:
-
help text
Main dialog for changing services.
- Return value:
-
for wizard sequencer
Main dialog for changing services.
- Return value:
-
for wizard sequencer
Help text for auto-complex-screen
- Return value:
-
help text
Add service by hand.
- Return value:
-
new service name (already added to RunlevelEd::services) or ""
Main dialog for changing services.
- Return value:
-
for wizard sequencer
Sets columns 0-S (runlevels) in table so they are synchronized with checkboxes.
Like Popup::LongText
- Parameters:
-
headline a headline richtext `RichText(_("<p>foo...</p>")) hdim popup width vdim popup height
- Return value:
-
continue?
Disable the service. Changes global services.
- Parameters:
-
service_name name of the service.
DUH, in fact ENABLES the service. but the described function will be there sometime
- Parameters:
-
service_name Name of service to process.
Converts a list to a map with values of true
- Parameters:
-
l a list
- Return value:
-
a map
- Parameters:
-
m a map
- Return value:
-
keys of the map