summaryrefslogtreecommitdiffstats
path: root/liveinit
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-07-22 15:20:34 +0200
committer Eric Hameleers <alien@slackware.com>2016-07-22 15:20:34 +0200
commit0d75cd1e2689f4c59ced3915475554f25a73dfb7 (patch)
treeee1d28da7517e123dc1ca1ce4bb67c84ee580d7d /liveinit
parent73dec0ccb2a628309cebf43c93d47a71afa7c635 (diff)
downloadliveslak-0d75cd1e2689f4c59ced3915475554f25a73dfb7.tar.gz
liveslak-0d75cd1e2689f4c59ced3915475554f25a73dfb7.tar.xz
liveinit: replace instances of 'live' username with '${LIVEUID}'.
Diffstat (limited to '')
-rwxr-xr-xliveinit14
1 files changed, 8 insertions, 6 deletions
diff --git a/liveinit b/liveinit
index bde1cb4..db03808 100755
--- a/liveinit
+++ b/liveinit
@@ -40,6 +40,8 @@ LIVEMAIN="@LIVEMAIN@"
MARKER="@MARKER@"
PERSISTENCE="@PERSISTENCE@"
+LIVEUID="@LIVEUID@"
+
LIVEMEDIA=""
LIVEPATH=""
@@ -893,21 +895,21 @@ EOT
echo ${TZ} > /mnt/overlay/etc/timezone
# KDE4 and PLASMA5 user timezone re-configuration:
- if [ -f /mnt/overlay/home/live/.kde/share/config/ktimezonedrc ]; then
+ if [ -f /mnt/overlay/home/${LIVEUID}/.kde/share/config/ktimezonedrc ]; then
sed -i -e "s%^LocalZone=.*%LocalZone=${TZ}%" \
- /mnt/overlay/home/live/.kde/share/config/ktimezonedrc
+ /mnt/overlay/home/${LIVEUID}/.kde/share/config/ktimezonedrc
fi
- if [ -f /mnt/overlay/home/live/.config/ktimezonedrc ]; then
+ if [ -f /mnt/overlay/home/${LIVEUID}/.config/ktimezonedrc ]; then
sed -i -e "s%^LocalZone=.*%LocalZone=${TZ}%" \
- /mnt/overlay/home/live/.config/ktimezonedrc
+ /mnt/overlay/home/${LIVEUID}/.config/ktimezonedrc
fi
fi
if [ ! -z "$LIVEPW" ]; then
# User entered a custom live password on the boot commandline:
- echo "${MARKER}: Changing password for user 'live'."
+ echo "${MARKER}: Changing password for user '${LIVEUID}'."
chroot /mnt/overlay /usr/sbin/chpasswd <<EOPW
-live:${LIVEPW}
+${LIVEUID}:${LIVEPW}
EOPW
fi