From 718089f7cb499d2a9935de71dcbc8b3e53c6fb2a Mon Sep 17 00:00:00 2001
From: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Date: Sun, 26 May 2013 18:56:25 -0300
Subject: [PATCH] [configs/releng] Use drop-in feature of systemd for getty
 autologin

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
---
 .../etc/systemd/system/getty@tty1.service.d/autologin.conf | 3 +++
 configs/releng/root-image/root/customize_root_image.sh     | 7 +------
 2 files changed, 4 insertions(+), 6 deletions(-)
 create mode 100644 configs/releng/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf

diff --git a/configs/releng/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf b/configs/releng/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf
new file mode 100644
index 00000000..d1d8474c
--- /dev/null
+++ b/configs/releng/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf
@@ -0,0 +1,3 @@
+[Service]
+ExecStart=
+ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux
diff --git a/configs/releng/root-image/root/customize_root_image.sh b/configs/releng/root-image/root/customize_root_image.sh
index cc478450..ba106c82 100755
--- a/configs/releng/root-image/root/customize_root_image.sh
+++ b/configs/releng/root-image/root/customize_root_image.sh
@@ -17,9 +17,4 @@ chmod 440 /etc/sudoers.d/g_wheel
 
 sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
 
-sed 's#\(^ExecStart=-/sbin/agetty\)#\1 --autologin root#;
-     s#\(^Alias=getty.target.wants/\).\+#\1autologin@tty1.service#' \
-     /usr/lib/systemd/system/getty@.service > /etc/systemd/system/autologin@.service
-
-systemctl disable getty@tty1.service
-systemctl enable multi-user.target pacman-init.service autologin@.service dhcpcd.service
+systemctl enable multi-user.target pacman-init.service dhcpcd.service
-- 
GitLab