diff options
author | 2018-03-15 13:06:32 -0400 | |
---|---|---|
committer | 2018-03-15 13:06:32 -0400 | |
commit | 3eca4027c0ed5aa526cbe94a92c0f0ddff8d186a (patch) | |
tree | b18ee9504e6e200027a041b6dec29622991be5e6 | |
parent | autoconfig: fix the indentation (diff) | |
download | livecd-tools-3eca4027c0ed5aa526cbe94a92c0f0ddff8d186a.tar.gz livecd-tools-3eca4027c0ed5aa526cbe94a92c0f0ddff8d186a.tar.bz2 livecd-tools-3eca4027c0ed5aa526cbe94a92c0f0ddff8d186a.zip |
add secureconsole boot option
don't log in every console if the user requests secureconsole
-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" |