[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#602788: read /sys/class/tty/console/active



Control: tag -1 +patch

Hi,

The attached patch should (I will test it tomorrow) fix the problem.

-- 
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics
--- live-config-getty-generator.orig	2019-10-22 21:06:50.858966292 +0200
+++ live-config-getty-generator	2019-05-19 10:11:26.000000000 +0200
@@ -73,9 +73,9 @@
 	# Configure autologin
 	if [ -n "${LIVE_USERNAME}" ]
 	then
-		for TTY in tty1 tty2 tty3 tty4 tty5 tty6 $(cat /sys/class/tty/console/active)
+		for NUMBER in $(seq 1 6)
 		do
-			GETTY_SERVICE_D=$SYSTEMD_DIR/getty@${TTY}.service.d
+			GETTY_SERVICE_D=$SYSTEMD_DIR/getty@tty${NUMBER}.service.d
 			CONF=$GETTY_SERVICE_D/live-config_autologin.conf
 			mkdir -p $GETTY_SERVICE_D
 

Reply to: