commit: 3eca4027c0ed5aa526cbe94a92c0f0ddff8d186a Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org> AuthorDate: Thu Mar 15 17:06:32 2018 +0000 Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org> CommitDate: Thu Mar 15 17:06:32 2018 +0000 URL: https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=3eca4027
add secureconsole boot option don't log in every console if the user requests secureconsole init.d/fixinittab | 18 ++++++++++++++---- 1 file 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"