altboot: Update 0.0.0 version
authorMatthias Hentges <oe@hentges.net>
Sat, 28 Oct 2006 16:38:49 +0000 (16:38 +0000)
committerMatthias Hentges <oe@hentges.net>
Sat, 28 Oct 2006 16:38:49 +0000 (16:38 +0000)
packages/altboot/files/altboot.func
packages/altboot/files/altbootctl
packages/altboot/files/altbootctl.conf
packages/altboot/files/init.altboot

index b3d25ff..a4ac6ed 100644 (file)
@@ -606,7 +606,7 @@ echo_pref() {
 
 dump_pref() {
        data_name="$1"  
-       echo "`eval echo -e ${data_name} | sed "s/\#\#\#/\#\#\#\\n/g"|sed s/^\ // `"
+       echo "`eval echo -e \\$${data_name} | sed "s/\#\#\#/\#\#\#\\n/g"|sed s/^\ // `"
        
        #echo "-- `eval echo ${data_name}` --" 
        #debug_echo "[$menu_fileflags]"
index e09df19..58976af 100755 (executable)
@@ -55,7 +55,7 @@ ask_pref() {
        
        #echo "[$1] -> $SETTING_OLD_VALUE"
        #echo -e "$SETTING_TEXT"
-
+       
 
        if test "$SETTING_VALUES" = "<STRING>"
        then                            
@@ -92,6 +92,8 @@ ask_pref() {
                # If it's not a string, it's a fixed list of possible settings
                echo -e "\nSelect one of the following:\n"      
                cnt=1   
+               
+               echo " $SETTING_VALUES"
                for val in $SETTING_VALUES
                do
                        if test "$val" != "$SETTING_OLD_VALUE"
index 0a358c7..09681bf 100644 (file)
@@ -10,7 +10,7 @@
 TARGETS="REMEMBER_LAST_SELECTION ENABLE_ALTBOOT FSCK_IMAGES TIMEOUT INIT_RUNLEVEL NO_GUI_RL \
         USB_HOST_AVAILABLE USB_NETWORKING_AVAILABLE ASK_PW_ON_BOOT SD_DEVICE SD_KERNEL_MODULE \
         IMAGE_PATH IMAGE_TYPE ENABLE_IMAGECONF USB_STORAGE_MODULES USB_STORAGE_PARTITION \
-        USB_STORAGE_WAIT SD_MOUNTPOINT"
+        USB_STORAGE_WAIT SD_MOUNTPOINT ENABLE_DEBUGGING ENABLE_DEBUG_SHELL"
 
 
 REMEMBER_LAST_SELECTION_VALUES="yes no"
@@ -33,9 +33,13 @@ NO_GUI_RL_VALUES="<STRING>"
 NO_GUI_RL_TEXT="GUI-less runlevel"
 NO_GUI_RL_MENUPOS="Core"
 
-ENABLE_DEBUG_VALUES="yes no"
-ENABLE_DEBUG_TEXT="Enable debug output"
-ENABLE_DEBUG_MENUPOS="Core"
+ENABLE_DEBUGGING_VALUES="auto yes no"
+ENABLE_DEBUGGING_TEXT="Enable debugging output"
+ENABLE_DEBUGGING_MENUPOS="Core"
+
+ENABLE_DEBUG_SHELL_VALUES="yes no"
+ENABLE_DEBUG_SHELL_TEXT="Enable a shell prompt after kernel init"
+ENABLE_DEBUG_SHELL_MENUPOS="Core"
 
 FSCK_IMAGES_VALUES="yes no"
 FSCK_IMAGES_TEXT="Automatically fsck loop-images"
index e09739c..dc3ff07 100644 (file)
@@ -141,6 +141,8 @@ show_menu() {
                                done
                                cd "$OLD_PWD"
 
+                       else 
+                               debug_echo "show_menu(): \$M_TITLE is empty"
                        fi
                        M_TITLE=""
                fi
@@ -160,10 +162,13 @@ show_sub_menu() {
                
        d_entries="`dump_pref "menu_filelist" | grep "$dirname/"`"
        
+       #dump_pref "menu_filelist"
+       #dump_pref "menu_fileflags"
        #echo "[$d_entries]"
        
        echo -e "\naltboot v$VERSION: $dirname menu\n" 
        
+       #debug_echo "show_sub_menu(): ping"
        
        for d_entry in $d_entries
        do
@@ -376,16 +381,27 @@ wait_for_input() {
 }
 
 # * * * * * * This is the main function * * * * * *
-# Note: this is positively ugly. If someone knows a better way to detect wheter
-# we are already booted into a runlevel _without_ reading /var and / or using `runlevel`
-# PLEASE let me know.
 
 if ( echo "$VERSION" |  egrep -iq "(snapshot|-rc)" )
+then
+       if test "$ENABLE_DEBUGGING" = "auto" -o -z "$ENABLE_DEBUGGING"
+       then
+               ENABLE_DEBUG="yes"              
+       fi
+fi
+
+test "$ENABLE_DEBUG_SHELL" = "yes" && debug_shell 4 >/dev/null 2>&1 &
+
+if test "$ENABLE_DEBUGGING" = "yes"
 then
        ENABLE_DEBUG="yes"
        debug_shell 4 >/dev/null 2>&1 &
 fi
 
+# Note: this is positively ugly. If someone knows a better way to detect whether
+# we are already booted into a runlevel _without_ reading /var and / or using `runlevel`
+# PLEASE let me know.
+
 if test -f /proc/cmdline -a "`ps ax|wc -l|tr -d " "`" -gt 30 -a "$1" != "-force" -a "$1" != "+force"
 then
        echo "altboot: Using real init [$REAL_INIT] [$*] [`ps ax|wc -l|tr -d " "`] *" >"$OUT_TTY"