Data for configuration of services, input and output functions.
Martin Vidner <mvidner@suse.cz>
Petr Blahos <pblahos@suse.cz>
Martin Lazar <mlazar@suse.cz>
List of Global Functions
CheckPortmap - Check for portmap. Portmap should be started if inetd, nfs, nfsserver, nis, ... is started. This checks the dependency.
ClearServices - Set all dirty services as clean and tries to read original "start"/"stop" for them.
Export - Export user settings.
FilterAlreadyDoneServices - Gets a list of dependent services and a target state they should be in. Filters out those that are already in the target state. If both init_time and run_time are on, a conjunction is needed.
GetModified - Returns true if the settings were modified
GetRunlevel4Support - Returns whether runlevel 4 is supported in RLEd.
Import - Import user settings
Init - Init function.
Read - Read settings
ServiceDependencies - Resolve which services need to be enabled/disabled
ServiceInstall - Enable specified service, and all required services.
ServiceRemove - Disable specified service, and all dependence services.
SetModified - Function sets an internal variable indicating that any settings were modified to "true". Used for autoinst cloning.
SetRunlevel4Support - Sets whether runlevel 4 should be supported.
StartContainsImplicitly - Is a service started in a runlevel, given the list of rulevels it is started in? This looks like a simple contains, but "B" implicitly expands to all runlevels. See also bug #17234.
Summary -
Write - Save changed services into proper runlevels. Save also changed default runlevel.
getDefaultPicker - Returns items for default runlevel combo box. (Excludes 0, 1, 6, S and B)
getRunlevelDescr - Returns textual runlevel description. Descriptions are hard-coded in ycp script.
isDirty - Were some settings changed?
isDisabled - Is a service disabled? Checks whether the default runlevel is in the list of runlevels
List of Global Variables
current - Current runlevel
default_runlevel - Default runlevel (after boot)
runlevels - List of all runlevels available in the system.
service_list - List of all service names. Filled by Read, used to get all services' status.
services - List of all services. Each item is a map described above. @ref service
x11_selected - Proposal parameter: if it changes, we repropose
Check for portmap. Portmap should be started if inetd, nfs, nfsserver, nis, ... is started. This checks the dependency.
Return value
string - name of the first enabled service that requires portmap
Set all dirty services as clean and tries to read original "start"/"stop" for them.
Return value
void
Export user settings.
Return value
map - user settings:<pre>$[ "services": $[ map of dirty services ], "default": the default runlevel, if changed, ]</pre>
Gets a list of dependent services and a target state they should be in. Filters out those that are already in the target state. If both init_time and run_time are on, a conjunction is needed.
Function parameters
list<string> svcs
list<string> rls
boolean enable
boolean init_time
boolean run_time
Return value
list<string>
Returns true if the settings were modified
Return value
boolean - settings were modified
Returns whether runlevel 4 is supported in RLEd.
Return value
boolean - supported
Import user settings
Function parameters
map s
Return value
boolean - success state
See also:
Export
Init function.
Return value
void
See also:
FATE #303798: YaST2 runlevel editor: offer easy enablement and configuration of runlevel 4
Resolve which services need to be enabled/disabled
Function parameters
string service
boolean enable
Return value
list<string> - a list of services (excluding itself) required to start a service (enable) or to be stopped because they require the service (disable), ordered by their dependencies. Missing services are included, system facilities excluded.<br> If dependencies are disabled, returns an empty list, as if there were no dependencies.
Enable specified service, and all required services.
Function parameters
string service
list<string> rls
Return value
integer - 0 = ok, 1 = service not found
Disable specified service, and all dependence services.
Function parameters
string service
list<string> rls
Return value
integer - 0 = ok
Function sets an internal variable indicating that any settings were modified to "true". Used for autoinst cloning.
Return value
void
Sets whether runlevel 4 should be supported.
Function parameters
boolean new_state
Return value
void
See also:
FATE #303798
Is a service started in a runlevel, given the list of rulevels it is started in? This looks like a simple contains, but "B" implicitly expands to all runlevels. See also bug #17234.
Function parameters
list<string> rls
string rl
Return value
boolean - should it be running in rl?
Save changed services into proper runlevels. Save also changed default runlevel.
Return value
boolean - success
Returns items for default runlevel combo box. (Excludes 0, 1, 6, S and B)
Function parameters
symbol mode
Return value
list - List of items. Default is selected.
Returns textual runlevel description. Descriptions are hard-coded in ycp script.
Function parameters
string rl
Return value
string - Description.