From 3da264121f90511cbe644bde1ca1bca1460c7ce9 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sun, 13 Dec 2020 21:20:42 +0100 Subject: setup2hd: fixes in post-installation routine for liveslak to hardisk --- setup2hd/setup.liveslak.tpl | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/setup2hd/setup.liveslak.tpl b/setup2hd/setup.liveslak.tpl index 2ea7860..3f34852 100644 --- a/setup2hd/setup.liveslak.tpl +++ b/setup2hd/setup.liveslak.tpl @@ -149,6 +149,7 @@ EOT /etc/rc.d/rc.gpm \ /etc/slackpkg \ /etc/vconsole.conf \ + /var/lib/sddm/state.conf \ /var/lib/slackpkg/current # Point xdm to the custom /etc/X11/xdm/liveslak-xdm/xdm-config: sed -i ${T_PX}/etc/rc.d/rc.4 -e 's,bin/xdm -nodaemon,& -config /etc/X11/xdm/liveslak-xdm/xdm-config,' @@ -177,16 +178,10 @@ EOT /home/@LIVEUID@/.screenrc \ /home/@LIVEUID@/.xprofile \ /home/@LIVEUID@/.xscreensaver - if [ "@LIVEUID@" != ${UACCOUNT} ]; then - rsync -a $T_PX/home/@LIVEUID@/ $T_PX/home/${UACCOUNT}/ - chroot ${T_PX} /usr/bin/chown -R ${UACCOUNT} /home/${UACCOUNT} - rm -rf $T_PX/home/@LIVEUID@ - fi fi # If the Live OS is real-time capable we need to apply that to the install: - if [ "@LIVEDE@" = "PLASMA5" -o "@LIVEDE@" = "DAW" -o "@LIVEDE@" = "STUDIOWARE" ]; -then + if [ "@LIVEDE@" = "DAW" -o "@LIVEDE@" = "STUDIOWARE" ]; then unsquashfs -n -f -dest $T_PX \ /mnt/livemedia/@LIVEMAIN@/system/0099*zzzconf*.sxz \ /etc/security/limits.d/rt_audio.conf \ @@ -196,8 +191,7 @@ then fi # Copy relevant settings for Live DAW: - if [ "@LIVEDE@" = "DAW" ]; -then + if [ "@LIVEDE@" = "DAW" ]; then LCLIVEDE=$(echo @LIVEDE@ |tr 'A-Z' 'a-z') unsquashfs -n -f -dest $T_PX \ /mnt/livemedia/@LIVEMAIN@/system/0099*zzzconf*.sxz \ @@ -219,13 +213,20 @@ then /home/@LIVEUID@/.config/autostart/qjackctl.desktop \ /home/@LIVEUID@/.config/rncbc.org/QjackCtl.conf \ /home/@LIVEUID@/.config/kscreenlockerrc - if [ "@LIVEUID@" != ${UACCOUNT} ]; then - rsync -a $T_PX/home/@LIVEUID@/ $T_PX/home/${UACCOUNT}/ - rm -rf $T_PX/home/@LIVEUID@ - fi fi fi + # If we restored user customizations and the new user account is + # not the same as the live user, sync the files over: + if [ "@LIVEUID@" != ${UACCOUNT} ]; then + rsync -a $T_PX/home/@LIVEUID@/ $T_PX/home/${UACCOUNT}/ + rm -rf $T_PX/home/@LIVEUID@ + # Also change SDDM default user: + sed -i ${T_PX}/var/lib/sddm/state.conf -e "s/User=@LIVEUID@/User=${UACCOUNT}/g" + fi + # Let's ensure the proper ownership: + chroot ${T_PX} /usr/bin/chown -R ${UACCTNR} /home/${UACCOUNT} + # Remove the marker file from the filesystem root: rm -f ${T_PX}/@MARKER@ -- cgit v1.2.3