[Lunar-commits] CVS: theedge/var/lib/lunar/functions main.lunar, 1.17, 1.18

Auke Kok sofar at lunar-linux.org
Mon Sep 27 21:41:07 UTC 2004


Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory espresso.foo-projects.org:/tmp/cvs-serv22100

Modified Files:
	main.lunar 
Log Message:
#452: force double checking on $LUNAR_MODULE with some msgs.


Index: main.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/main.lunar,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- main.lunar	26 Sep 2004 20:47:41 -0000	1.17
+++ main.lunar	27 Sep 2004 21:41:05 -0000	1.18
@@ -50,10 +50,26 @@
 
 update() {
   debug_msg "update ($@)"
-  if  ps  -C  lin  >  /dev/null;  then
-    echo    "Unable to update lunar concurrently while installing."
-    sleep   5
-    return  1
+  if ps -C lin > /dev/null ; then
+    error_message "${PROBLEM_COLOR}Unable to update lunar concurrently while installing.${DEFAILT_COLOR}"
+    return 1
+  fi
+
+  # test if $LUNAR_MODULE is installed (for old boxes)
+  if [ -z "$LUNAR_MODULE" ] ; then
+    for ALT in $LUNAR_MODULES ; do
+      if module_installed $ALT ; then
+        lunar set LUNAR_MODULE $ALT
+        export LUNAR_MODULE=$ALT
+	verbose_msg "LUNAR_MODULE set to \"$ALT\""
+      fi
+    done
+    if [ -z "$LUNAR_MODULE" ] ; then
+      error_message "${PROBLEM_COLOR}Error:${DEFAULT_COLOR} ${MESSAGE_COLOR}No core code installed: install one of the following first:${DEFAULT_COLOR}"
+      error_message $LUNAR_MODULES
+      error_message "${MESSAGE_COLOR}then try again (I can't update if I don't know which toolset I use)${DEFAULT_COLOR}"
+      return 1
+    fi
   fi
 
   if lin moonbase ; then
@@ -64,7 +80,6 @@
       lunar renew
     fi
   fi
-
 }
 
 



More information about the Lunar-commits mailing list