[sles-beta] off: /etc/default vs. /etc/sysconfig

Thorsten Kukuk kukuk at suse.de
Thu Aug 27 08:03:48 MDT 2015


Hi,

On Thu, Aug 27, Czanik, Péter wrote:

> Hi,
> 
> A slightly offtopic question, but I could not find anything about it in the
> documentation. What is the difference between /etc/default and
> /etc/sysconfig? Which to use in which situation? On a quick look my theory
> is, that both define environment variables, those in /etc/sysconfig are
> used by YaST and startscripts, those in /etc/default are the leftovers :-)

Your quick look is wrong. This are not environment variables and 
/etc/default/ are no leftover ones.

In /etc/sysconfig, there are configuration variables used by several
tools/scripts. Beside some exceptions, they are not under control of
RPM, but fillup. But the mandatory format is, that you can source them
from a shell script.
/etc/sysconfig is >>15 years old and available in more or less the same
form on most distributions.
/etc/default did come much later from projects coming from Solaris,
there is no definition for the format of the files, and their are under
control of RPM.

> In other words, for a 3rd party software, which of these two directories
> should be used?

Depends on, on which systems this 3rd party software should run and if they
want to follow the fillup rules or not.

  Thorsten

-- 
Thorsten Kukuk, Senior Architect SLES & Common Code Base
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)


More information about the sles-beta mailing list