tag 549317 + patch
thanks

Hi Jussi!

On Fri, Oct 02, 2009 at 03:05:53PM +0300, Jussi Myllykoski wrote:
> I get this message on boot:
> 
> ....
> Setting console screen modes
> sed: can't read /etc/inittab: No such file or directory
> ....
> 
> This is on a system where sysvinit has been replaced with upstart,
> so if I understand correctly the data that used to be in /etc/inittab
> is now in several files found at /etc/init/
> 
> This isn't a showstopper by any means, just something that I thought
> might be good to bring to your attention (if it isn't already).

Thanks a lot for your report.  Init systems seem to be kbd’s greatest
enemy :-)

May I ask you to apply the attached patch to your local copy of
/etc/init.d/kbd and confirm that it works?  The solution isn’t perfect
since it’s theoretically possible that gettys are started from files
other than /etc/init/tty*.conf, but I guess it is good enough for most
cases.

Cheers,
-- 
Michael Schutte <mi...@uiae.at>
--- /etc/init.d/kbd~
+++ /etc/init.d/kbd
@@ -119,7 +119,13 @@ setup ()
         [ "$VERBOSE" != "no" ] && log_action_end_msg 0
     fi
 
-    LIST_CONSOLES=`sed -e '/^ *#/d' /etc/inittab | grep -e '\<tty[0-9]*\>' | awk -F: '{printf "%s ", $1}'`
+    if [ -d /etc/init ] && which initctl >/dev/null; then
+	    # Upstart
+	    LIST_CONSOLES=`cd /etc/init; find -name 'tty*.conf' -printf '%f ' | sed -e 's/[^0-9 ]//g'`
+    else
+	    # traditional SysV init
+	    LIST_CONSOLES=`sed -e '/^ *#/d' /etc/inittab | grep -e '\<tty[0-9]*\>' | awk -F: '{printf "%s ", $1}'`
+    fi
 
     # Global default font+map
     if [ -z "${HAVE_SETUPCON}" -a "${CONSOLE_FONT}" ]; then

Attachment: signature.asc
Description: Digital signature

Reply via email to