about summary refs log tree commit diff
path: root/dracut
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2014-09-20 11:14:29 +0200
committerJuan RP <xtraeme@gmail.com>2014-09-20 11:14:29 +0200
commitab3a398875ca1a6acd701dda74257644f078a4fb (patch)
tree8b53ead7f70653d4a4aad707802f34f7ca3d5bf6 /dracut
parentbb8d32e2c2f3c885cb36cccf4db42089aeffb3f0 (diff)
downloadhrmpf-ab3a398875ca1a6acd701dda74257644f078a4fb.tar.gz
hrmpf-ab3a398875ca1a6acd701dda74257644f078a4fb.tar.xz
hrmpf-ab3a398875ca1a6acd701dda74257644f078a4fb.zip
mklive: set live user shell to /bin/sh; use /etc/issue; disable autologin.
Diffstat (limited to 'dracut')
-rw-r--r--dracut/adduser.sh17
1 files changed, 1 insertions, 16 deletions
diff --git a/dracut/adduser.sh b/dracut/adduser.sh
index 736e33e..9dd7ddc 100644
--- a/dracut/adduser.sh
+++ b/dracut/adduser.sh
@@ -14,7 +14,7 @@ echo "USERNAME=$USERNAME" >> ${NEWROOT}/etc/default/live.conf
 chmod 644 ${NEWROOT}/etc/default/live.conf
 
 # Create new user and remove password. We'll use autologin by default.
-chroot ${NEWROOT} useradd -c $USERNAME -m $USERNAME -G wheel -s /bin/bash
+chroot ${NEWROOT} useradd -c $USERNAME -m $USERNAME -G wheel -s /bin/sh
 chroot ${NEWROOT} passwd -d $USERNAME >/dev/null 2>&1
 
 # Setup default root password (voidlinux).
@@ -25,21 +25,6 @@ if [ -f ${NEWROOT}/etc/sudoers ]; then
     echo "${USERNAME}  ALL=(ALL) NOPASSWD: ALL" >> ${NEWROOT}/etc/sudoers
 fi
 
-# Enable autologin for agetty(8) on tty1 with runit.
-if [ -d ${NEWROOT}/etc/runit ]; then
-    sed "s|agetty|& -a $USERNAME|" -i ${NEWROOT}/etc/sv/agetty-tty1/run
-fi
-
-# Enable autologin for agetty(8) on tty1 with systemd.
-if [ -d ${NEWROOT}/etc/systemd/system ]; then
-    rm -f "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service"
-    sed -e "s|/sbin/agetty --noclear|& -a ${USERNAME}|g" \
-        "${NEWROOT}/usr/lib/systemd/system/getty@.service" > \
-        "${NEWROOT}/etc/systemd/system/getty@.service"
-    ln -sf /etc/systemd/system/getty@.service \
-        "${NEWROOT}/etc/systemd/system/getty.target.wants/getty@tty1.service"
-fi
-
 if [ -d ${NEWROOT}/etc/polkit-1 ]; then
     # If polkit is installed allow users in the wheel group to run anything.
     cat > ${NEWROOT}/etc/polkit-1/rules.d/void-live.rules <<_EOF