Adding debian version 2.0~a1-1.
[live-boot-grml.git] / scripts / live-bottom / 19keyboard
index 1df83fb..5a262fa 100755 (executable)
@@ -18,7 +18,7 @@ case "${1}" in
                ;;
 esac
 
-# live-initramfs header
+# live-boot header
 
 if [ -n "${NOCONSOLEKEYBOARD}" ]
 then
@@ -29,7 +29,7 @@ fi
 
 log_begin_msg "Setting up console keyboard"
 
-# live-initramfs script
+# live-boot script
 
 kbd=
 cslayout=
@@ -63,17 +63,17 @@ fi
 
 if [ -x /root/bin/setupcon ]
 then
-       if [ -f /root/etc/default/console-setup ]
-       then
-               # lenny
-               KEYBOARD_FILE="/root/etc/default/console-setup"
-       elif [ -f /root/etc/default/keyboard ]
+       if [ -f /root/etc/default/keyboard ]
        then
                # squeeze
-               KEYBOARD_FILE="/root/etc/default/keyboard"
+               KEYBOARD_FILE="/etc/default/keyboard"
+       elif [ -f /root/etc/default/console-setup ]
+       then
+               # lenny
+               KEYBOARD_FILE="/etc/default/console-setup"
        fi
 
-       if [ -n "${KEYBOARD_FILE}" ]
+       if [ -n "/root${KEYBOARD_FILE}" ]
        then
                if [ "${cslayout}" ]
                then
@@ -104,7 +104,14 @@ then
                live-preseed /root console-setup/optionscode '' false
                live-preseed /root console-setup/codesetcode '' false
 
-               sed -i 's/CONSOLE_SCREEN=$/CONSOLE_SCREEN=setupcon/; t END; b; : END; n; b END' /root/etc/init.d/usplash
+               if [ -f /root/etc/init.d/usplash ]
+               then
+                       sed -i 's/CONSOLE_SCREEN=$/CONSOLE_SCREEN=setupcon/; t END; b; : END; n; b END' /root/etc/init.d/usplash
+               elif [ -f /root/etc/init/usplash.conf ]
+               then
+                       sed -i '/^post-stop script/a\
+    setupcon' /root/etc/init/usplash.conf
+               fi
        fi
 elif [ -e /root/usr/sbin/install-keymap ]
 then