[Pkg-kbd-commit] r175 - people/barbier/kbd/trunk/debian

Denis Barbier barbier at costa.debian.org
Tue Apr 11 08:24:49 UTC 2006


Author: barbier
Date: 2006-04-11 08:24:48 +0000 (Tue, 11 Apr 2006)
New Revision: 175

Modified:
   people/barbier/kbd/trunk/debian/changelog
   people/barbier/kbd/trunk/debian/console-screen.kbd.sh
Log:
  * debian/console-screen.kbd.sh: When this script is run, only the first TTY
    is created, so all other TTYs have no settings.  A workaround is to add
      u8:23:once:/etc/init.d/console-screen.kbd.sh reload
    in /etc/inittab so that this script is run again after TTYs are allocated.
    If console detection does not work as expected, LIST_CONSOLES can be set
    in /etc/kbd/config, it contains a space seperated list of TTY numbers to
    be modified by this script.
    WARNING: this is still experimental!


Modified: people/barbier/kbd/trunk/debian/changelog
===================================================================
--- people/barbier/kbd/trunk/debian/changelog	2006-04-11 08:15:39 UTC (rev 174)
+++ people/barbier/kbd/trunk/debian/changelog	2006-04-11 08:24:48 UTC (rev 175)
@@ -1,11 +1,20 @@
 kbd (1.12-15) UNRELEASED; urgency=low
 
-  * debian/console-screen.kbd.sh: Fix LSB runtime info, as reported in #361051.
-
   * debian/patches/getfd.diff: New patch, the getfd function now tries to
     open /proc/self/fd/0, so that kbd_mode can be used to query or modify any
     TTY by running kbd_mode < /dev/ttyN.
 
+  * debian/console-screen.kbd.sh: Fix LSB runtime info, as reported in #361051.
+
+  * debian/console-screen.kbd.sh: When this script is run, only the first TTY
+    is created, so all other TTYs have no settings.  A workaround is to add
+      u8:23:once:/etc/init.d/console-screen.kbd.sh reload
+    in /etc/inittab so that this script is run again after TTYs are allocated.
+    If console detection does not work as expected, LIST_CONSOLES can be set
+    in /etc/kbd/config, it contains a space seperated list of TTY numbers to
+    be modified by this script.
+    WARNING: this is still experimental!
+
  -- Denis Barbier <barbier at debian.org>  Tue, 11 Apr 2006 00:37:44 +0200
 
 kbd (1.12-14) unstable; urgency=low

Modified: people/barbier/kbd/trunk/debian/console-screen.kbd.sh
===================================================================
--- people/barbier/kbd/trunk/debian/console-screen.kbd.sh	2006-04-11 08:15:39 UTC (rev 174)
+++ people/barbier/kbd/trunk/debian/console-screen.kbd.sh	2006-04-11 08:24:48 UTC (rev 175)
@@ -79,9 +79,13 @@
         echo .
     fi
 
-    NUM_CONSOLES=`fgconsole --next-available`
-    NUM_CONSOLES=`expr ${NUM_CONSOLES} - 1`
-    [ ${NUM_CONSOLES} -eq 1 ] && NUM_CONSOLES=6
+    if [ "$RUNLEVEL" = S ]; then
+        LIST_CONSOLES=0
+    elif [ -z "$LIST_CONSOLES" ]; then
+        #  Wait for getty to provide TTYs
+        sleep 3
+        LIST_CONSOLES=`sed -e '/^ *#/d' /etc/inittab | grep 'tty[0-9]*$' | awk -F: '{printf "%s ", $1}'`
+    fi
 
     # Global default font+map
     if [ "${CONSOLE_FONT}" ]; then
@@ -89,7 +93,7 @@
         [ "${CONSOLE_MAP}" ] && SETFONT_OPT="$SETFONT_OPT -m ${CONSOLE_MAP}"
 
         # Set for the first 6 VCs (as they are allocated in /etc/inittab)
-        for vc in `seq 0 ${NUM_CONSOLES}` 
+        for vc in $LIST_CONSOLES
         do
             ${SETFONT} -C ${DEVICE_PREFIX}$vc ${SETFONT_OPT} ${CONSOLE_FONT} || { echo " failed."; break; }
         done
@@ -148,10 +152,14 @@
     fi
     CHARMAP=`LANG=$LANG LC_ALL=$LC_ALL LC_CTYPE=$LC_CTYPE locale charmap 2>/dev/null`
     if [ "$CHARMAP" = "UTF-8" ]; then
-        unicode_start 2> /dev/null || true
+        action=unicode_start
     else
-        unicode_stop 2> /dev/null|| true
+        action=unicode_stop
     fi
+    for vc in $LIST_CONSOLES
+    do
+        $action < ${DEVICE_PREFIX}$vc > ${DEVICE_PREFIX}$vc 2> /dev/null || true
+    done
 
     # screensaver stuff
     setterm_args=""
@@ -189,12 +197,12 @@
 
     # Allow user to remap keys on the console
     if [ -r /etc/$PKG/remap ]; then
-	dumpkeys < ${DEVICE_PREFIX}1 | sed -f /etc/$PKG/remap | loadkeys --quiet
+        dumpkeys < ${DEVICE_PREFIX}1 | sed -f /etc/$PKG/remap | loadkeys --quiet
     fi
 
     # Set LEDS here
     if [ -n "$LEDS" ]; then
-        for i in `seq 0 $NUM_CONSOLES`
+        for i in $LIST_CONSOLES
         do
             setleds -D $LEDS < $DEVICE_PREFIX$i
         done
@@ -203,13 +211,13 @@
 
 case "$1" in
     start|reload|restart|force-reload)
-	setup
-	;;
+        setup
+        ;;
     stop)
-	;;
+        ;;
     *)
-	setup
-	;;
+        setup
+        ;;
 esac
 
 :




More information about the Pkg-kbd-commit mailing list