[Lunar-commits] r23507 - lunar/trunk/var/lib/lunar/functions
Auke Kok
sofar at lunar-linux.org
Mon Mar 5 23:47:13 CET 2007
Author: sofar
Date: 2007-03-05 23:47:13 +0100 (Mon, 05 Mar 2007)
New Revision: 23507
Modified:
lunar/trunk/var/lib/lunar/functions/messages.lunar
Log:
Semi-backwards compatible code for oquery.
oquery will pickup settings from choices previously made in mquery. Use as follows:
old: mquery USE_SSL "use ssl?" y
new: oquery USE_SSL "use ssl?" y --enable-ssl "--disable-ssl --without-openssl"
the USE_SSL will be used and checked at install time, and stored. OPTS flags
are added at CONFIGURE time and _not_ stored since they will be re-added on
the fly.
I modified apache2 to use this code and it works great.
Modified: lunar/trunk/var/lib/lunar/functions/messages.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/messages.lunar 2007-03-05 22:04:04 UTC (rev 23506)
+++ lunar/trunk/var/lib/lunar/functions/messages.lunar 2007-03-05 22:47:13 UTC (rev 23507)
@@ -167,7 +167,7 @@
# mquery is a wrapper to autodetect if a certain y/n parameter in a module
# config is not set yet and handles the case in a single function
-# usage: mqeury USE_LILO "Use lilo instead of grub" ?
+# usage: mqeury USE_LILO "Use lilo instead of grub ?" y
# note : $MODULE must be set properly
mquery()
{
@@ -184,7 +184,25 @@
fi
}
+# oquery adds to OPTS instead of storing a variable
+# usage: oqeury "Enable SSL support" y "--enable-ssl" "--disable-ssl"
+# note : $MODULE must be set properly
+oquery()
+{
+ debug_msg "mquery ($@)"
+ if [ -n "$MODULE" ]; then
+ # use mquery to get an answer, store the choice for later
+ mquery "$1" "$2" "$3"
+ # and just lookup the result
+ if [ $(get_module_config $1) == "y" ] ; then
+ OPTS="$OPTS $4"
+ else
+ OPTS="$OPTS $5"
+ fi
+ fi
+}
+
color() {
debug_msg "color ($@)"
case $1 in
More information about the Lunar-commits
mailing list