mklive: set live user shell to /bin/sh; use /etc/issue; disable autologin.

This commit is contained in:
Juan RP 2014-09-20 11:14:29 +02:00
parent bb8d32e2c2
commit ab3a398875
3 changed files with 4 additions and 23 deletions

View File

@ -1,12 +1,10 @@
############################################################################### ###############################################################################
Welcome to the Void Linux Live system, you have been autologged in. Welcome to the Void Linux Live system, the `root` password is `voidlinux`.
This user has full sudo(8) permissions without any password, be careful
executing commands through sudo(8).
To start the installation please type: To start the installation please type:
$ sudo void-installer $ void-installer
and follow the on-screen instructions. Thanks for using Void Linux. and follow the on-screen instructions. Thanks for using Void Linux.

View File

@ -14,7 +14,7 @@ echo "USERNAME=$USERNAME" >> ${NEWROOT}/etc/default/live.conf
chmod 644 ${NEWROOT}/etc/default/live.conf chmod 644 ${NEWROOT}/etc/default/live.conf
# Create new user and remove password. We'll use autologin by default. # 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 chroot ${NEWROOT} passwd -d $USERNAME >/dev/null 2>&1
# Setup default root password (voidlinux). # Setup default root password (voidlinux).
@ -25,21 +25,6 @@ if [ -f ${NEWROOT}/etc/sudoers ]; then
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> ${NEWROOT}/etc/sudoers echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> ${NEWROOT}/etc/sudoers
fi 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 [ -d ${NEWROOT}/etc/polkit-1 ]; then
# If polkit is installed allow users in the wheel group to run anything. # If polkit is installed allow users in the wheel group to run anything.
cat > ${NEWROOT}/etc/polkit-1/rules.d/void-live.rules <<_EOF cat > ${NEWROOT}/etc/polkit-1/rules.d/void-live.rules <<_EOF

View File

@ -314,11 +314,9 @@ install_prereqs
info_msg "[3/9] Installing void pkgs into the rootfs: ${PACKAGE_LIST} ..." info_msg "[3/9] Installing void pkgs into the rootfs: ${PACKAGE_LIST} ..."
install_packages install_packages
#
# Prepare /etc/motd.
#
mkdir -p "$ROOTFS"/etc mkdir -p "$ROOTFS"/etc
[ -s data/motd ] && cp data/motd $ROOTFS/etc [ -s data/motd ] && cp data/motd $ROOTFS/etc
[ -s data/issue ] && cp data/issue $ROOTFS/etc
export PATH=$VOIDHOSTDIR/usr/bin:$VOIDHOSTDIR/usr/sbin:$PATH export PATH=$VOIDHOSTDIR/usr/bin:$VOIDHOSTDIR/usr/sbin:$PATH
export LD_LIBRARY_PATH=$VOIDHOSTDIR/usr/lib export LD_LIBRARY_PATH=$VOIDHOSTDIR/usr/lib