From: Arne Fitzenreiter Date: Tue, 17 Apr 2018 10:20:15 +0000 (+0200) Subject: firstsetup: fix disabling tty's on scon mode X-Git-Tag: v2.21-core122~178^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4172fad43550157c154150c0589fcdfa1be4790;p=ipfire-2.x.git firstsetup: fix disabling tty's on scon mode Signed-off-by: Arne Fitzenreiter --- diff --git a/src/initscripts/system/firstsetup b/src/initscripts/system/firstsetup index 154a066998..0704a98dcc 100644 --- a/src/initscripts/system/firstsetup +++ b/src/initscripts/system/firstsetup @@ -5,8 +5,9 @@ if [ -e /var/ipfire/main/firstsetup_ok ]; then exit 0; fi -# disable consoles if tty2 are not present -if [ ! -e /dev/tty2 ]; then +# disable consoles if tty are not present +openvt -f -w -- /bin/sh -c echo > /dev/null 2>&1 +if [ ! "${?}" == "0" ]; then # Disable console on tty2-6 sed -i -e "s|2:2345:respawn:|#2:2345:respawn:|g" /etc/inittab sed -i -e "s|3:2345:respawn:|#3:2345:respawn:|g" /etc/inittab