diff options
-rw-r--r-- | init.d/fixinittab | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/init.d/fixinittab b/init.d/fixinittab index de9ca06..d675b9b 100644 --- a/init.d/fixinittab +++ b/init.d/fixinittab @@ -12,6 +12,12 @@ start() return 1 fi + for x in ${CMDLINE} ; do + case "${x}" in + secureconsole) SECURECONSOLE="yes";; + esac + done + ebegin "Adjusting inittab" # Create a backup if [ ! -e /etc/inittab.old ] @@ -76,10 +82,14 @@ start() else if [ "${LIVECD_CONSOLE}" = "tty0" -o "${LIVECD_CONSOLE}" = "" ] then - for x in 1 2 3 4 5 6 - do - echo "c${x}:12345:respawn:/sbin/mingetty --noclear --autologin $(id -nu 1000 2>/dev/null || echo root) tty${x}" >> /etc/inittab - done + if [ "${SECURECONSOLE}" = "yes" ]; then + echo "c1:12345:respawn:/sbin/mingetty --noclear --autologin $(id -nu 1000 2>/dev/null || echo root) tty${x}" >> /etc/inittab + else + for x in 1 2 3 4 5 6 + do + echo "c${x}:12345:respawn:/sbin/mingetty --noclear --autologin $(id -nu 1000 2>/dev/null || echo root) tty${x}" >> /etc/inittab + done + fi else eindent ebegin "Adding ${LIVECD_CONSOLE} console to inittab" |