Commit 84259fc2 authored by Andreas Henriksson's avatar Andreas Henriksson

kbd.init: make initial whitespace on comment lines optional

This is a fix for a regression introduced in commit 523d5c5f:
    kbd.init: Better tty detection from inittab, closes: #744973

Practical difference for default/unchanged /etc/inittab:

$ sed -ne '/^[ \t]#/d; /tty[0-9]\+/ s/.*tty\([0-9]\+\).*/\1/ p' /etc/inittab
7
7
1
2
3
4
5
6
$ sed -ne '/^[ \t]*#/d; /tty[0-9]\+/ s/.*tty\([0-9]\+\).*/\1/ p' /etc/inittab
1
2
3
4
5
6

(Because there are lines starting with # as first character containing tty7
in comment. No initial whitespace.)
parent 14572fba
......@@ -135,7 +135,7 @@ setup ()
LIST_CONSOLES=`seq 1 "$N_CONSOLES"`
else
# traditional SysV init
LIST_CONSOLES=`sed -ne '/^[ \t]#/d; /tty[0-9]\+/ s/.*tty\([0-9]\+\).*/\1/ p' /etc/inittab`
LIST_CONSOLES=`sed -ne '/^[ \t]*#/d; /tty[0-9]\+/ s/.*tty\([0-9]\+\).*/\1/ p' /etc/inittab`
fi
# Global default font+map
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment