From e950c8cf66f4483254693cc8a104ae314e8b4c59 Mon Sep 17 00:00:00 2001 From: xSmurf Date: Wed, 30 Sep 2015 20:01:37 +0000 Subject: [PATCH] Fixed inittab changes on rebuild --- board/coreboot/post_build.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/board/coreboot/post_build.sh b/board/coreboot/post_build.sh index f6d0741..8e0f6bb 100755 --- a/board/coreboot/post_build.sh +++ b/board/coreboot/post_build.sh @@ -28,11 +28,15 @@ if [ -e $TARGET_DIR/etc/init.d/S50dropbear ]; then fi # Enable virtual terminals in inittab -echo "Enabling virtual terminal 2..12 ..." -for ii in {12..2}; do - sed -E -i 's/GENERIC_SERIAL/GENERIC_SERIAL\ntty'$ii'::askfirst:-\/bin\/login/' "$TARGET_DIR/etc/inittab" - error_exit $? -done +if [ ! $(fgrep tty12 "$TARGET_DIR/etc/inittab") ]; then + echo "Enabling virtual terminal 2..12 ..." + for ii in {12..2}; do + sed -E -i 's/GENERIC_SERIAL/GENERIC_SERIAL\ntty'$ii'::askfirst:-\/bin\/login/' "$TARGET_DIR/etc/inittab" + error_exit $? + done +else + echo "Virtual terminals already enabled." +fi # Set pax flax (tentative) echo "Setting paxflag on libcrypto ..."