|
@@ -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/[email protected]"
|
|
|
- sed -e "s|/sbin/agetty --noclear|& -a ${USERNAME}|g" \
|
|
|
- "${NEWROOT}/usr/lib/systemd/system/[email protected]" > \
|
|
|
- "${NEWROOT}/etc/systemd/system/[email protected]"
|
|
|
- ln -sf /etc/systemd/system/[email protected] \
|
|
|
- "${NEWROOT}/etc/systemd/system/getty.target.wants/[email protected]"
|
|
|
-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
|