Quellcode durchsuchen

vmklive-adduser: use agetty -a option to autologin.

Juan RP vor 12 Jahren
Ursprung
Commit
54c2812edf
1 geänderte Dateien mit 2 neuen und 25 gelöschten Zeilen
  1. 2 25
      dracut/vmklive-adduser.sh

+ 2 - 25
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/[email protected] ]; then
         rm -f "${NEWROOT}/etc/systemd/system/getty.target.wants/[email protected]"
-	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/[email protected]" > \
                 "${NEWROOT}/etc/systemd/system/getty.target.wants/[email protected]"
 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