Package: console-tools
Version: 1:0.2.3dbs-67
Severity: normal
Tags: patch

Hello,

same here, seems to be related to bash-4.1 which has a more strict
handling of set -e

output of aptitude:

Setting up console-tools (1:0.2.3dbs-67) ...              
Setting console screen modes and fonts.                   
Setting console screen modes and fonts.                   
invoke-rc.d: initscript console-screen.sh, action "start" failed.      
dpkg: error processing console-tools (--configure):       
 subprocess installed post-installation script returned error exit status 1     
           
Errors were encountered while processing:                 
 console-tools
[..]

problem:

readlink /proc/self/fd/0 | grep -q -e /dev/vc -e '/dev/tty[^p]' -e /dev/console

grep returns 1 when readlink ends up at something like /dev/pts/5 which
happens when dpkg does its job on a non vt and due to the use of set -e
the initscript exits and hence dpkg yields a failed --configure

so dont rely on the return value but use another test like

if [ "x" != "x`readlink /proc/self/fd/0 | grep -e /dev/vc \
      -e '/dev/tty[^p]' -e /dev/console`" ] ; then

patch attached, have a nice day


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32.2-xy (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages console-tools depends on:
ii  debconf [debconf-2.0]      1.5.28        Debian configuration management sy
ii  libc6                      2.10.2-3      Embedded GNU C Library: Shared lib
ii  libconsole                 1:0.2.3dbs-67 Shared libraries for Linux console
ii  lsb-base                   3.2-23        Linux Standard Base 3.2 init scrip

Versions of packages console-tools recommends:
ii  console-common                0.7.85     basic infrastructure for text cons
ii  console-data                  2:1.10-2   keymaps, fonts, charset maps, fall

Versions of packages console-tools suggests:
pn  kbd-compat                    <none>     (no description available)

-- no debconf information
--- a/console-screen.sh 2009-12-19 20:27:27.000000000 +0100
+++ b/console-screen.sh 2010-01-04 15:04:03.000000000 +0100
@@ -82,10 +82,10 @@ setup_fonts ()
     CONSOLE_TYPE=`fgconsole 2>/dev/null` || return 0
 
     if [ ! $CONSOLE_TYPE = "serial" ]  ; then
-       readlink /proc/self/fd/0 | grep -q -e /dev/vc -e '/dev/tty[^p]' -e 
/dev/console
-       if [ $? -eq 0 ] ; then
-           VT="yes"
-           reset_vga_palette
+       if [ "x" != "x`readlink /proc/self/fd/0 | grep -e /dev/vc \
+            -e '/dev/tty[^p]' -e /dev/console`" ] ; then
+         VT="yes"
+         reset_vga_palette
        fi
     fi
 

Reply via email to