note that on ar71xx based system the uci-default script inittab-console-fix up will modify the inittab causing issues.
the default script
@@[[
#!/bin/sh
#
# Copyright (C) 2011 OpenWrt.org
#
enable_console_login() {
local cons=$1
local initline="$cons::askfirst:/bin/ash --login"
grep -qs "^$initline" /etc/inittab || {
echo "$initline" >> /etc/inittab
sync
kill -HUP 1
}
}
inittab_console_fixup() {
for cons in ttyS0 ttyATH0; do
grep -qs "console=$cons" /proc/cmdline && {
enable_console_login $cons
}
done
}
inittab_console_fixup
exit 0
]]@@
will append an /bin/ash --login no matter what you have added to inittab when building images.
so... this script should be edited to test for login and then add the correct inittab entry to protect the console
modify the script in target/linux/ar71xx/base-files/etc/uci-defaults/inittab-console-fixup to read as follows
@@[[
#!/bin/sh
#
# Copyright (C) 2011 OpenWrt.org
#
enable_console_login() {
local cons=$1
local initline
if [ -e /bin/login ]; then
initline="$cons::askfirst:/bin/login"
else
initline="$cons::askfirst:/bin/ash --login"
fi
grep -qs "^$initline" /etc/inittab || {
echo "$initline" >> /etc/inittab
sync
kill -HUP 1
}
}
inittab_console_fixup() {
for cons in ttyS0 ttyATH0; do
grep -qs "console=$cons" /proc/cmdline && {
enable_console_login $cons
}
done
}
inittab_console_fixup
exit 0
]]@@
(Last edited by lsoltero on 10 Jan 2013, 17:56)