[Lunar-commits] r23510 - lunar/trunk/var/lib/lunar/functions

Auke Kok sofar at lunar-linux.org
Tue Mar 6 00:47:03 CET 2007


Author: sofar
Date: 2007-03-06 00:47:03 +0100 (Tue, 06 Mar 2007)
New Revision: 23510

Modified:
   lunar/trunk/var/lib/lunar/functions/messages.lunar
Log:
replace oquery with a much more friendly extended mquery function


Modified: lunar/trunk/var/lib/lunar/functions/messages.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/messages.lunar	2007-03-05 23:04:59 UTC (rev 23509)
+++ lunar/trunk/var/lib/lunar/functions/messages.lunar	2007-03-05 23:47:03 UTC (rev 23510)
@@ -167,8 +167,9 @@
 
 # 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: mquery USE_LILO "Use lilo instead of grub ?" y
+# usage: mquery USE_LILO "Use lilo instead of grub ?" y [yesopts] [noopts]
 # note : $MODULE must be set properly
+# note : both [yesopts] and [noopts] may be empty or ""
 mquery()
 {
     debug_msg "mquery ($@)"
@@ -181,19 +182,7 @@
                 set_module_config "$1" n
             fi
         fi
-    fi
-}
-
-# oquery adds to OPTS instead of storing a variable
-# usage: oquery USE_SSL "Enable SSL support" y "--enable-ssl" "--disable-ssl"
-# note : $MODULE must be set properly
-oquery()
-{
-    debug_msg "oquery ($@)"
-    if [ -n "$MODULE" ]; then
-        # use mquery to get an answer, store the choice for later
-        mquery "$1" "$2" "$3"
-        # and just lookup the result
+        # and lookup the result in case of yes/no opts
         if [ $(get_module_config $1) == "y" ] ; then
             OPTS="$OPTS $4"
         else



More information about the Lunar-commits mailing list