The main configuration of SUSE LINUX can be made with the configuration files in /etc/sysconfig. Former versions of SUSE LINUX relied on /etc/rc.config for system configuration, but it became obsolete in previous versions. /etc/rc.config is not created at installation time, as all system configuration is controlled by /etc/sysconfig. However, if /etc/rc.config exists at the time of a system update, it remains intact.
The individual files in /etc/sysconfig are only read by the scripts to which they are relevant. This ensures that network settings, for instance, need to be parsed only by network-related scripts. Apart from that, there are many other system configuration files that are generated according to the settings in /etc/sysconfig. This task is performed by SuSEconfig. For example, if you change the network configuration, SuSEconfig is likely to make changes to the file /etc/host.conf as well, as this is one of the files relevant for the network configuration.
If you change anything in these files manually, run SuSEconfig afterwards to make sure all the necessary changes are made in all the relevant places. If you change the configuration using the YaST sysconfig editor, all changes are applied automatically — YaST automatically starts SuSEconfig to update the configuration files as needed.
This concept enables you to make basic changes to your configuration without needing to reboot the system. Because some changes are rather complex, some programs must be restarted for the changes to take effect. For instance, changes to the network configuration may require a restart of the network programs concerned. This can be achieved by entering the commands rcnetwork stop and rcnetwork start.
The recommended way to change the system configuration includes the following steps:
Bring the system into single user mode (runlevel 1) with init 1.
Change the configuration files as needed. This can be done using an editor of your choice or with the sysconfig editor of YaST (refer to Section 13.7. “The YaST sysconfig Editor”).
|Manual Changes to the System Configuration|
If you do not use YaST to change the configuration files in /etc/sysconfig, make sure that empty variable values are represented by two quotation marks (KEYTABLE="") and that values with blanks in them are enclosed in quotation marks. Values consisting of one word only do not need to be quoted.
Execute SuSEconfig to make sure that the changes take effect. If you have changed the configuration files with YaST, this is done automatically.
Bring your system back to the previous runlevel with a command like init 3 (replace 3 with the previous runlevel).
This procedure is mainly relevant when changing system-wide settings (such as the network configuration). Small changes should not require going into single user mode, but you could still do so to make absolutely sure that all the programs concerned are correctly restarted.
To disable the automatic configuration of SuSEconfig, set the variable ENABLE_SUSECONFIG in /etc/sysconfig/suseconfig to no. Do not disable SuSEconfig if you want to use the SUSE installation support. It is also possible to disable the autoconfiguration partially.