What's the best way to process the csw.conf file?
I looked into pkg/cswclassutils/trunk/files/CSWcswclassutils.i.cswinitsmf
and slow this:
# Source csw.conf, if it exists
if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then
. $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf
fi
if [ -f $PKG_INSTALL_ROOT/etc/opt/csw/csw.conf ] ; then
. $PKG_INSTALL_ROOT/etc/opt/csw/csw.conf
fi
(...)
# Determine if service should be started or not
daemon=yes
if [ "$autoenable_daemons" = "no" ]; then
daemon=no
fi
eval autoenable_service="\$autoenable_$service"
if [ "$autoenable_service" = "no" ]; then
daemon=no
elif [ "$autoenable_service" = "yes" ]; then
daemon=yes
fi
Is the idea that each and every postinstall script that needs to
determine the settings, must on their own figure out:
- the location of the file
- how to read the file (source or parse)
- how to extract specific variables
I thought we had some kind of a library that solves this once for
good. Do we have anything like it?
(more context: https://www.opencsw.org/mantis/view.php?id=4409)
Maciej
_______________________________________________
maintainers mailing list
[email protected]
https://lists.opencsw.org/mailman/listinfo/maintainers
.:: This mailing list's archive is public. ::.