YaST2 Developers Documentation: Runlevel Editor | ![]() |
![]() functions files intro |
Proposal parameter: if it changes, we repropose
Like "requires" but in reverse direction. Used for stopping and disabling services.
A graph where nodes are scripts or system facilities but not normal facilities (ie. provides are solved).
Structure service One service is described by such map:"servicename" : $[ "defstart" : [ "2", "3", "5", ], // Default-Start comment "defstop" : [ "0", "1", "6", ], // Default-Stop comment // "should" dependencies (+) are filtered by addRequires "reqstart" : [ "$network", "portmap" ], // Required-Start comment "reqstop" : [ "$network", "portmap" ], // Required-Stop comment "shortdescription" : "text...", // Description comment "description" : "text...", // Description comment // which runlevels service is really started/stopped in // read from /etc/init.d/{rc?,boot}.d/* links // // Note that the boot process (init.d/boot.d) is considered // a "B" runlevel that is implicitly contained in the other runlevels. // Using // list st = services ["boot.local", "start"]:[] // contains (st, "3") // DON'T // results in false but that's probably not what you want. // Use // StartContainsImplicitly (st, "3") // which tests for "3" and "B". "start" : [ "3", "5", ], "stop" : [ "3", "5", ], "started" : 0, // return from rcservice status (integer) "dirty" : false, // was the entry changed? ]
List of all services. Each item is a map described above. service
List of all service names. Filled by Read, used to get all services' status.
Default runlevel (after boot)
Backup of default runlevel.
List of all runlevels available in the system.
Current runlevel
ONLY ONE SCRIPT provides a facility in this model. In SuSE packages, the only exception are sendmail and postfix both providing sendmail but they cannot be installed together anyway. atd has Provides: at, so what_provides["at"] == "atd"; Identity is not represented explicitly: ypbind has Provides: ypbind, but haskey (what_provides, "ypbind") == false;
System facility definitions "should" dependencies (+) are filtered by addRequires /etc/insserv.conf: system_requires["$network"] == ["network", "+pcmcia", "+hotplug"];
Read settings
If there's a dependency loop, dependency checking is disabled.
Create requires from services, system_requires and what_provides.
Resolve provides, filter out "should" dependencies (+) and add the requirements to "requires". Missing services are not detected.
Resolve which services need to be enabled/disabled
Argh, not a builtin
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.
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.
Whether a set of runlevels is a subset of another set of runlevels. But expands "B" to the whole set
Set all dirty services as clean and tries to read original "start"/"stop" for them.
Is a service disabled? Checks whether the list of runlevels it runs in is empty
Check for portmap. Portmap should be started if inetd, nfs, nfsserver, nis, ... is started. This checks the dependency.
If inetd and xinetd are enabled together, show a warning.
Runlevel's own finetune function useing chkconfig It's easy param name name of service to adjust rl list of runlevels in which service should start return success state ------Tedd Guo 2006, 9, 25-------
Save changed services into proper runlevels. Save also changed default runlevel.
Were some settings changed?
Export user settings.
Import user settings
Returns textual runlevel description. Descriptions are hard-coded in ycp script.
A buffer for sprint
String print
|
YaST2 Developers Documentation | ![]() |