From 67d057e7e7b83a615cd0c1f2e144db11af936f09 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Thu, 25 Jun 2020 19:21:31 +0200 Subject: Make the name "Slackware Live User" configurable --- make_slackware_live.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/make_slackware_live.sh b/make_slackware_live.sh index 0d5b364..e830a6c 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -80,12 +80,18 @@ THEDATE=$(date +%Y%m%d) # --------------------------------------------------------------------------- # +# Distribution name: +DISTRO=${DISTRO:-"slackware"} + # The live username of the image: LIVEUID=${LIVEUID:-"live"} # The number of the live account in the image: LIVEUIDNR=${LIVEUIDNR:-"1000"} +# The full name of the live account in the image: +LIVEUIDFN=${LIVEUIDFN:-"${DISTRO^} Live User"} + # The root and live user passwords of the image: ROOTPW=${ROOTPW:-"root"} LIVEPW=${LIVEPW:-"live"} @@ -96,9 +102,6 @@ NVUIDNR=${NVUIDNR:-"365"} NVGRP=${NVFRP:-"nvidia"} NVGRPNR=${NVUIDNR:-"365"} -# Distribution name: -DISTRO=${DISTRO:-"slackware"} - # Custom name for the host: LIVE_HOSTNAME=${LIVE_HOSTNAME:-"darkstar"} @@ -1468,7 +1471,7 @@ then fi # Create a nonprivileged user account (called "live" by default): -chroot ${LIVE_ROOTDIR} /usr/sbin/useradd -c "Slackware Live User" -g users -G wheel,audio,cdrom,floppy,plugdev,video,power,netdev,lp,scanner,kmem,dialout,games,disk,input -u ${LIVEUIDNR} -d /home/${LIVEUID} -m -s /bin/bash ${LIVEUID} +chroot ${LIVE_ROOTDIR} /usr/sbin/useradd -c "${LIVEUIDFN}" -g users -G wheel,audio,cdrom,floppy,plugdev,video,power,netdev,lp,scanner,kmem,dialout,games,disk,input -u ${LIVEUIDNR} -d /home/${LIVEUID} -m -s /bin/bash ${LIVEUID} echo "${LIVEUID}:${LIVEPW}" | chroot ${LIVE_ROOTDIR} /usr/sbin/chpasswd # Configure suauth if we are not on a PAM system (where this does not work): -- cgit v1.2.3