YaST2 System Services (Runlevel) Configuration Tool

Purpose

Pre-requisites

System services (runlevel editor) strongly depends on SuSE Linux conventions. Expected /etc/inittab format:

Current runlevel is read from output of /sbin/runlevel.
List of init scripts is obtained from /etc/init.d/. Some names are skipped, because they are not init scripts: core, README, rc, rx, *.rpm*, *.ba*, *~, ... . For each init script, comment is read and default runlevels and description are taken from it. See LSB for specification of init script comments. Current settings, which mean list of runlevels service is started in is taken from /etc/init.d/rc?.d subdirectories. E.g. if there is a script /etc/init.d/rc5.d/S08network then it means that service network is started in runlevel 5.
Service status is obtained by running initscript status.

Functionality

Now as we have all settings read, we may change them. Changing default runlevel is straightforward. Just pick a new value from combobox. Note that this setting means which runlevel system switches to after boot!!! So this option has no immediate effect.
Detailed service editation enable changing which runlevels service runs in. Some special options are available: FIXME: WILL WE USE START_VARIABLES?

All above settings are saved after button [Finish] is pressed. But following operations happen immediately:

Saving

Default runlevel is saved to the same place it was read from.
Services are saved using
/sbin/insserv -r servicename
/sbin/insserv servicename,start=list_of_runlevels