Options for the CSW conf file

CSW Configuration file (csw.conf) overview

We are starting to promote the idea of a global configuration file for certain options for CSW packages. This configuration file is not meant to be a catch-all for any and all configuration; but rather, to determine high-level package preferences for a site, or a specific machine.

The concept is that packages that have a postinstall to potentially autoconfigure daemons, should first read in the config file to determine if they should autoenable or not.

Conf File locations:

/opt/csw/etc/csw.conf /etc/opt/csw/csw.conf

Files should be checked in that specific order. This is to allow a global configuration file in /opt/csw/etc, but then also allow for machine-specific overrides in /etc/opt/csw
Since postinstall scripts are always /bin/sh scripts, these files should be used in some manner similar to the following /bin/sh code:
# in postinstall if [ -x $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then . $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf fi if [ -x $PKG_INSTALL_ROOT/etc/opt/csw/csw.conf ] ; then . $PKG_INSTALL_ROOT/etc/opt/csw/csw.conf fi

Standard variables

Right now, there are two officially recognized variables that you may set:



The default is "yes", as implied at the top of this page. Any postinstall scripts that enable daemons, should first check for if [ "$autoenable_daemons" = "no" ] and skip enabling the demon to run at boot time, if it is so. (similarly, they should not start the demon "right now", if this variable is set to no)

It is also be allowable, to give site administrators the option of having a demon-specific "(enable/do not enable) daemon" flag as above, if that package chooses to support it.

In this case, the syntax in the csw.conf file would look something like:
autoenable_daemons=no autoenable_specificdaemonname=yes

The only "mandatory" variable for postinstall scripts to check, however, is the global one.

Please note that this variable is for package installation time only; ie: by "postinstall" specifically.
"normal" boot time scripts, such as /etc/init.d/cswyourprog, should not check it.
They should use their own "normal" way of enabling/disabling the demon.
If there is no "normal" way, it is suggested that boot scripts check for the existance of the normal config file for the software, and not start the demon if none is present.

In that way, postinstall scripts can create a default config file, so long as autoenable_daemons=yes or not present. That way, the user has the option to manually create the config file later on, and thus "manually" enable the demon at boot time (as opposed to "autoenable").



Some installations like to keep things EXACTLY the same across all their Solaris 8, 9, and 10 machines. This means that they do not wish to use SMF to configure demons, even if it is available.

This page changed by Philip Brown on Fri May 9 13:59:51 EDT 2008
Valid HTML 4.01!