]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
firstsetup: fix disabling tty's on scon mode
authorArne Fitzenreiter <arne_f@ipfire.org>
Tue, 17 Apr 2018 10:20:15 +0000 (12:20 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Tue, 17 Apr 2018 11:42:17 +0000 (13:42 +0200)
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/initscripts/system/firstsetup

index 154a066998dea671d2d163ac3bb3af67e8c99d63..0704a98dcca19c1000899c8ddd0eabe80e2db73d 100644 (file)
@@ -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