about summary refs log tree commit diff
path: root/dracut/vmklive-adduser.sh
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2012-11-22 10:30:58 +0100
committerJuan RP <xtraeme@gmail.com>2012-11-22 10:30:58 +0100
commit54c2812edf8f2028b43992befc4f45fa6f31b84f (patch)
treea98ebf580df5dd5feb744142360809df3b3ade6b /dracut/vmklive-adduser.sh
parent6564ab4e5b74a39b73c360919f4de268351e5d20 (diff)
downloadhrmpf-54c2812edf8f2028b43992befc4f45fa6f31b84f.tar.gz
hrmpf-54c2812edf8f2028b43992befc4f45fa6f31b84f.tar.xz
hrmpf-54c2812edf8f2028b43992befc4f45fa6f31b84f.zip
vmklive-adduser: use agetty -a option to autologin.
Diffstat (limited to 'dracut/vmklive-adduser.sh')
-rw-r--r--dracut/vmklive-adduser.sh27
1 files changed, 2 insertions, 25 deletions
diff --git a/dracut/vmklive-adduser.sh b/dracut/vmklive-adduser.sh
index 3e1049e..06a525f 100644
--- a/dracut/vmklive-adduser.sh
+++ b/dracut/vmklive-adduser.sh
@@ -18,33 +18,10 @@ if [ -f ${NEWROOT}/etc/sudoers ]; then
 	echo "${USERNAME}  ALL=(ALL) NOPASSWD: ALL" >> ${NEWROOT}/etc/sudoers
 fi
 
-# Enable autologin for getty(1).
+# Enable autologin for agetty(8).
 if [ -f ${NEWROOT}/usr/lib/systemd/system/getty@.service ]; then
         rm -f "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service"
-	sed -e "s|/sbin/agetty --noclear|/usr/sbin/live-getty|g" \
+	sed -e "s|/sbin/agetty --noclear|& -a ${USERNAME}|g" \
                 "${NEWROOT}/usr/lib/systemd/system/getty@.service" > \
                 "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service"
 fi
-
-# Create /usr/sbin/live-getty.
-cat > ${NEWROOT}/usr/sbin/live-getty <<_EOF
-#!/bin/sh
-
-if [ -x /usr/sbin/agetty ]; then
-	_getty=/usr/sbin/agetty
-elif [ -x /usr/sbin/getty ]; then
-	_getty=/usr/sbin/getty
-fi
-
-exec \${_getty} -n -l /usr/sbin/live-autologin \$*
-_EOF
-chmod 755 ${NEWROOT}/usr/sbin/live-getty
-
-# Create /usr/sbin/live-autologin.
-cat > ${NEWROOT}/usr/sbin/live-autologin <<_EOF
-#!/bin/sh
-
-. /etc/default/live.conf
-exec /usr/bin/login -f \$USERNAME
-_EOF
-chmod 755 ${NEWROOT}/usr/sbin/live-autologin