summaryrefslogtreecommitdiffstats
path: root/make_slackware_live.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-09-05 22:06:07 +0200
committer Eric Hameleers <alien@slackware.com>2020-09-05 22:06:07 +0200
commit194f79a647466b87d8afa8b43acdab4fb7d509ab (patch)
tree320e778e81e3f2834b04959e9ec2b8fbf3989904 /make_slackware_live.sh
parenta107c2a55f94e874303a9f79540f66d6829609ad (diff)
downloadliveslak-194f79a647466b87d8afa8b43acdab4fb7d509ab.tar.gz
liveslak-194f79a647466b87d8afa8b43acdab4fb7d509ab.tar.xz
Allow customization of the live user's full name
Diffstat (limited to 'make_slackware_live.sh')
-rwxr-xr-xmake_slackware_live.sh22
1 files changed, 16 insertions, 6 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index 0ca3c82..47806a3 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -83,14 +83,20 @@ THEDATE=$(date +%Y%m%d)
# Distribution name:
DISTRO=${DISTRO:-"slackware"}
+# What type of Live image?
+# Choices are: SLACKWARE, XFCE, DAW, PLASMA5, MATE, CINNAMON, DLACK, STUDIOWARE
+LIVEDE=${LIVEDE:-"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 full name of the live account in the image can be set per Live variant,
+# and will always be overridden by a LIVEUIDFN definition in the .conf file.
+# The LIVEUIDFN defaults to '${DISTRO^} Live User' if not set explicitly:
+LIVEUIDFN_DAW=""${DISTRO^} Live Musician"
# The root and live user passwords of the image:
ROOTPW=${ROOTPW:-"root"}
@@ -105,10 +111,6 @@ NVGRPNR=${NVUIDNR:-"365"}
# Custom name for the host:
LIVE_HOSTNAME=${LIVE_HOSTNAME:-"darkstar"}
-# What type of Live image?
-# Choices are: SLACKWARE, XFCE, DAW, PLASMA5, MATE, CINNAMON, DLACK, STUDIOWARE
-LIVEDE=${LIVEDE:-"SLACKWARE"}
-
# What runlevel to use if adding a DE like: XFCE, DAW, PLASMA5 etc...
RUNLEVEL=${RUNLEVEL:-4}
@@ -1475,6 +1477,14 @@ then
echo "${NVUID}:$(openssl rand -base64 12)" | chroot ${LIVE_ROOTDIR} /usr/sbin/chpasswd
fi
+# Determine the full name of the live account in the image:
+if [ -z ${LIVEUIDFN} ]; then
+ eval LIVEUIDFN=\$LIVEUIDFN_${LIVEDE}
+ if [ -z ${LIVEUIDFN} ]; then
+ LIVEUIDFN="${DISTRO^} Live User"
+ fi
+fi
+
# Create a nonprivileged user account (called "live" by default):
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