about summary refs log tree commit diff
path: root/dracut
diff options
context:
space:
mode:
Diffstat (limited to 'dracut')
-rw-r--r--dracut/adduser.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/dracut/adduser.sh b/dracut/adduser.sh
index 6d0142c..68b6bd4 100644
--- a/dracut/adduser.sh
+++ b/dracut/adduser.sh
@@ -6,8 +6,10 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
 
 echo void-live > ${NEWROOT}/etc/hostname
 
+AUTOLOGIN=$(getarg live.autologin)
 USERNAME=$(getarg live.user)
 USERSHELL=$(getarg live.shell)
+
 [ -z "$USERNAME" ] && USERNAME=anon
 [ -x $NEWROOT/bin/bash -a -z "$USERSHELL" ] && USERSHELL=/bin/bash
 [ -z "$USERSHELL" ] && USERSHELL=/bin/sh
@@ -48,3 +50,7 @@ polkit.addRule(function(action, subject) {
 _EOF
     chroot ${NEWROOT} chown polkitd:polkitd /etc/polkit-1/rules.d/void-live.rules
 fi
+
+if [ -n "$AUTOLOGIN" ]; then
+        sed -i "s,GETTY_ARGS=\"--noclear\",GETTY_ARGS=\"--noclear -a $USERNAME\",g" ${NEWROOT}/etc/sv/agetty-tty1/run
+fi