Commit 651133ce authored by Filippo Valsorda's avatar Filippo Valsorda

initramfs-init: add cmdline consoles to inittab

Sometimes a console is specified on the kernel command line but doesn't
get initialized by the kernel because for example the driver is built as
a module. The init should still spawn getty on it.
parent 59204d36
......@@ -106,7 +106,8 @@ list_console_devices() {
setup_inittab_console(){
term=vt100
# Inquire the kernel for list of console= devices
for tty in $(list_console_devices console); do
consoles="$(for c in console $KOPT_consoles; do list_console_devices $c; done)"
for tty in $consoles; do
# do nothing if inittab already have the tty set up
if ! grep -q "^$tty:" $sysroot/etc/inittab; then
echo "# enable login on alternative console" \
......@@ -342,6 +343,11 @@ for opt; do
SINGLEMODE=yes
continue
;;
console=*)
opt="${opt#*=}"
KOPT_consoles="${opt%%,*} $KOPT_consoles"
continue
;;
esac
for i in $myopts; do
......
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