summaryrefslogtreecommitdiffstats
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
parent73dec0ccb2a628309cebf43c93d47a71afa7c635 (diff)
downloadliveslak-0d75cd1e2689f4c59ced3915475554f25a73dfb7.tar.gz
liveslak-0d75cd1e2689f4c59ced3915475554f25a73dfb7.tar.xz
liveinit: replace instances of 'live' username with '${LIVEUID}'.
-rwxr-xr-xliveinit14
-rwxr-xr-xmake_slackware_live.sh1
2 files changed, 9 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
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index abbe5b7..dc615f1 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -1703,6 +1703,7 @@ cat $LIVE_TOOLDIR/liveinit | sed \
-e "s/@MEDIALABEL@/$MEDIALABEL/g" \
-e "s/@PERSISTENCE@/$PERSISTENCE/g" \
-e "s/@DARKSTAR@/$LIVE_HOSTNAME/g" \
+ -e "s/@LIVEUID@/$LIVEUID/g" \
> ${LIVE_ROOTDIR}/boot/initrd-tree/init
cat /dev/null > ${LIVE_ROOTDIR}/boot/initrd-tree/luksdev
# We do not add openobex to the initrd and don't want to see irrelevant errors: