[Lunar-commits] r14919 - lunar-iso/trunk/lunar-install/sbin

Auke Kok sofar at lunar-linux.org
Sun May 22 13:57:13 UTC 2005


Author: sofar
Date: 2005-05-22 13:57:12 +0000 (Sun, 22 May 2005)
New Revision: 14919

Modified:
   lunar-iso/trunk/lunar-install/sbin/lunar-install
Log:
Add long editor info and a bunch more. Also add some debugging info when commands fail, which should provide good debugging output.


Modified: lunar-iso/trunk/lunar-install/sbin/lunar-install
===================================================================
--- lunar-iso/trunk/lunar-install/sbin/lunar-install	2005-05-22 13:56:07 UTC (rev 14918)
+++ lunar-iso/trunk/lunar-install/sbin/lunar-install	2005-05-22 13:57:12 UTC (rev 14919)
@@ -46,15 +46,32 @@
 
 chroot_run()
 {
+    local RESULT
     mount -t proc proc $TARGET/proc
     mount -t devfs devfs $TARGET/dev
     mount -t tmpfs tmpfs $TARGET/tmp
     chroot $TARGET swapon -a
     chroot $TARGET $1 $2 $3 $4 $5 $6 $7 $8 $9
+    RESULT=$?
     chroot $TARGET swapoff -a
     umount $TARGET/tmp
     umount $TARGET/dev
     umount $TARGET/proc
+
+    # debug the problem in case there is one
+    (
+    	echo "ERROR: "
+	echo "ERROR: An error occurred while executing a command. The command was:"
+	echo "ERROR: \"$@\""
+	echo "ERROR: "
+	echo "ERROR: You should inspect any output above and retry the command with"
+	echo "ERROR: different input or parameters. Please report the problem if"
+	echo "ERROR: you think this error is displayed by mistake."
+	echo "ERROR: "
+	echo "ERROR: Press ENTER to continue"
+	read JUNK
+    ) >&2
+    return $RESULT
 }
 
 
@@ -851,18 +868,21 @@
 
 editor_menu()
 {
-    VI_HELP="good old vi"
-    NANO_HELP="nano is an enchanced free pico clone"
-    JOE_HELP="joe is a WS compatible editor"
+    EDITOR=`$DIALOG --title "Editor Selection Menu" --item-help --cr-wrap \
+            --menu "Not all of these editors are available right away. Some require that you compile them yourself (like emacs) or are only available on the target installation, and possibly emulated through another editor" 0 0 0 \
+	    "e3"    "available" \
+	            "an emacs, vim, pico emulator" \
+	    "emacs" "not available on the ISO" \
+	            "Richard Stallmans editor" \
+            "joe"   "available" \
+	            "WS compatible editor" \
+            "nano"  "available" \
+	            "a pico clone" \
+            "vi"    "emulated on the live ISO, but also fully installed" \
+	            "good old vi" \
+	    "zile"  "available" \
+	            "an emacs clone"`
 
-    HELP="During installation this maps e3 to the requested behaviour."
-    TITLE="Editor Selection Menu"
-
-    EDITOR=`$DIALOG --title "Editor Selection Menu" --item-help --menu "$HELP" 0 0 0 \
-                   "vi"     ""  "$VI_HELP"     \
-                   "joe"    ""  "$JOE_HELP"    \
-                   "nano"   ""  "$NANO_HELP"`
-
     export EDITOR
     J_OK=\\Z2
     DEFAULT=F



More information about the Lunar-commits mailing list