Previous Next Table of Contents

5. Distribution specific files

Linuxconf works on several Linux distributions. Most distributions basically use the same system components. Sometime they differ slightly; some commands and configuration file are not always located at the same place. To solve this, Linuxconf supports configuration files while are specific for each distribution. Files that define these distribution-specific changes are stored in /usr/lib/linuxconf/DIST/ where DIST is the name of the distribution (Red Hat, Caldera, SuSE, Debian, ...).

There are two type of files. One controlling the path and argument of commands and the other to control the path of configuration file.

5.1 The *.daemons files

A module may call external commands to perform a task. A module will seldom use a hard-coded path to call a command, as it may fail on some distributions. It will use the netconf_system_if() function or the POPEN object. Those functions use the *.daemons files found in the distribution-specific directory. Each command used by the module (and specific to this module) must be defined in a file MODULE.daemons where MODULE is the name of the module. This choice is not that important. It simply avoid a name clash with other modules. If a module provides such a file, it must provide one copy for each distribution supported by Linuxconf. They are, in alphabetical order,

Normally, one sub-directory is created for each distribution in the module source directory. The MODULE.daemons looks like:

        command_name command_absolute_path args_if_needed
        other_command ...
        

You must provide a definition for every command which will be used by the module.

Advantage of this strategy

By providing the MODULE.daemons, you are allowing:

5.2 The *.files file

A module may deliver a file MODULE.files for each distribution. The format of this file is very simple:

        key   path_of_the_file_on_this_distribution
        

The key is the path provided to the CONFIG_FILE declaration. This file is optional. You are allowed to provide a MODULE.files only for distribution which are different. The default path is the key when not explicitly found in the MODULE.files. As such the MODULE.files is optional.


Previous Next Table of Contents