Package gnue :: Package common :: Package base :: Module utils
[show private | hide private]

Module gnue.common.base.utils

The utils module provides some very basic although GNU Enterprise specific utility functions.
Function Summary
string config_files(name)
Return a list of filenames to parse for a specific configuration file.

Function Details

config_files(name)

Return a list of filenames to parse for a specific configuration file.

The list contains all existing config files in the following order of directories searched:
  1. system configuration file (usually /etc/gnue/*.conf)
  2. system configuration directory (usually /etc/gnue/*.d/)
  3. user configuration (~/.gnue/*.conf)
  4. local configuration (etc/*.conf)
  5. environment variable location ($GNUE_*)
  6. fixed system configuration (/etc/gnue/*.conf.fixed)

The practical use for 6. is to define configuration entries that cannot be overwritten by normal users.

For example, if name is connections, on a standard install on a POSIX system, the file would be searched in:
  1. /etc/gnue/connections.conf
  2. /etc/gnue/connections.d/*
  3. ~/.gnue/connections.conf
  4. etc/connections.conf (from the current directory)
  5. the content of the GNUE_CONNECTIONS environment variable
  6. /etc/gnue/connections.conf.fixed
Parameters:
name - name of the configuration file without the .conf ending
           (type=string)
Returns:
list of full path names of configuration files to parse
           (type=string)


GNUe Home

Public API

Developer's Corner