From ea9d53c822e835b854010f5e5bb37931f9986f86 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sat, 24 Mar 2018 13:26:32 +0100 Subject: [PATCH] inittab: change tty1 to console this reduce the differences between tty and scon installations and make it easier to switch between. Signed-off-by: Arne Fitzenreiter --- config/etc/inittab | 14 ++++++-------- config/etc/securetty | 8 +------- lfs/flash-images | 6 ++---- src/installer/main.c | 9 --------- 4 files changed, 9 insertions(+), 28 deletions(-) diff --git a/config/etc/inittab b/config/etc/inittab index 506fa237d4..acc1a7b35d 100644 --- a/config/etc/inittab +++ b/config/etc/inittab @@ -19,13 +19,11 @@ ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now su:S016:once:/sbin/sulogin -1:2345:respawn:/sbin/agetty tty1 9600 --noclear -2:2345:respawn:/sbin/agetty tty2 9600 -3:2345:respawn:/sbin/agetty tty3 9600 -4:2345:respawn:/sbin/agetty tty4 9600 -5:2345:respawn:/sbin/agetty tty5 9600 -6:2345:respawn:/sbin/agetty tty6 9600 -# *** Uncomment for serial console -#7:2345:respawn:/sbin/agetty ttyS0 +1:2345:respawn:/sbin/agetty console --noclear +2:2345:respawn:/sbin/agetty tty2 +3:2345:respawn:/sbin/agetty tty3 +4:2345:respawn:/sbin/agetty tty4 +5:2345:respawn:/sbin/agetty tty5 +6:2345:respawn:/sbin/agetty tty6 # End /etc/inittab diff --git a/config/etc/securetty b/config/etc/securetty index 3a69d0b6e7..995a1a1940 100644 --- a/config/etc/securetty +++ b/config/etc/securetty @@ -1,15 +1,9 @@ -tty1 +console tty2 tty3 tty4 tty5 tty6 -ttyAMA0 -ttyO2 -ttyS0 -ttyS1 -ttyS2 -ttyS4 ttyp0 ttyp1 ttyp2 diff --git a/lfs/flash-images b/lfs/flash-images index 996109ce44..09ad7a0130 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2017 IPFire Team # +# Copyright (C) 2007-2018 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -146,14 +146,12 @@ endif echo "THEME=ipfire" >> $(MNThdd)/var/ipfire/main/settings ifeq "$(SCON)" "1" - # Enable serial console - sed -i -e "s|1:2345:respawn:|#1:2345:respawn:|g" $(MNThdd)/etc/inittab + # Disable console on tty2-6 sed -i -e "s|2:2345:respawn:|#2:2345:respawn:|g" $(MNThdd)/etc/inittab sed -i -e "s|3:2345:respawn:|#3:2345:respawn:|g" $(MNThdd)/etc/inittab sed -i -e "s|4:2345:respawn:|#4:2345:respawn:|g" $(MNThdd)/etc/inittab sed -i -e "s|5:2345:respawn:|#5:2345:respawn:|g" $(MNThdd)/etc/inittab sed -i -e "s|6:2345:respawn:|#6:2345:respawn:|g" $(MNThdd)/etc/inittab - sed -i -e "s|#7:2345:respawn:|7:2345:respawn:|g" $(MNThdd)/etc/inittab ifeq "$(BUILD_PLATFORM)" "arm" sed -i -e "s| console=tty1 | console=ttyAMA0,115200n8 |g" $(MNThdd)/boot/cmdline.txt diff --git a/src/installer/main.c b/src/installer/main.c index a3642551d6..c7075aa71d 100644 --- a/src/installer/main.c +++ b/src/installer/main.c @@ -820,15 +820,6 @@ int main(int argc, char *argv[]) { fclose(f); replace(DESTINATION_MOUNT_PATH "/etc/default/grub", "panic=10", "panic=10 console=ttyS0,115200n8"); - - /* inittab */ - replace("/harddisk/etc/inittab", "1:2345:respawn:", "#1:2345:respawn:"); - replace("/harddisk/etc/inittab", "2:2345:respawn:", "#2:2345:respawn:"); - replace("/harddisk/etc/inittab", "3:2345:respawn:", "#3:2345:respawn:"); - replace("/harddisk/etc/inittab", "4:2345:respawn:", "#4:2345:respawn:"); - replace("/harddisk/etc/inittab", "5:2345:respawn:", "#5:2345:respawn:"); - replace("/harddisk/etc/inittab", "6:2345:respawn:", "#6:2345:respawn:"); - replace("/harddisk/etc/inittab", "#7:2345:respawn:", "7:2345:respawn:"); } /* novga */ -- 2.39.2