From 914e19372472552ace573ce196d18b8142be385b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 21 Sep 2014 09:31:43 +0200 Subject: mklive: add -a opt to set XBPS_ARCH (for musl); misc changes for dracut/adduser. --- dracut/adduser.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dracut/adduser.sh') diff --git a/dracut/adduser.sh b/dracut/adduser.sh index 8269730..8fbbc9a 100644 --- a/dracut/adduser.sh +++ b/dracut/adduser.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -x # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh @@ -20,11 +20,12 @@ if ! grep -q ${USERSHELL} ${NEWROOT}/etc/shells ; then fi # Create new user and remove password. We'll use autologin by default. -chroot ${NEWROOT} useradd -c $USERNAME -m $USERNAME -G wheel -s $USERSHELL +chroot ${NEWROOT} useradd -m -c $USERNAME -G wheel -s $USERSHELL $USERNAME chroot ${NEWROOT} passwd -d $USERNAME >/dev/null 2>&1 -# Setup default root password (voidlinux). +# Setup default root/user password (voidlinux). chroot ${NEWROOT} sh -c 'echo "root:voidlinux" | chpasswd -c SHA512' +chroot ${NEWROOT} sh -c "echo "$USERNAME:voidlinux" | chpasswd -c SHA512" # Enable sudo permission by default. if [ -f ${NEWROOT}/etc/sudoers ]; then -- cgit 1.4.1