X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-bottom%2F10adduser;h=0f28def6b36c5ad587fc5cf23646b556c7710871;hb=refs%2Ftags%2Fupstream%2F1.99.1;hp=394f007006e16e18e52132f4cd3adf658d454bf2;hpb=0a854a1e9307affdeaf96cb3ec0c864b171d66ca;p=live-boot-grml.git diff --git a/scripts/live-bottom/10adduser b/scripts/live-bottom/10adduser index 394f007..0f28def 100755 --- a/scripts/live-bottom/10adduser +++ b/scripts/live-bottom/10adduser @@ -1,26 +1,32 @@ #!/bin/sh -PREREQ="" -DESCRIPTION="Adding live session user..." +#set -e -. /scripts/live-functions +# initramfs-tools header + +PREREQ="" prereqs() { - echo "$PREREQ" + echo "${PREREQ}" } -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; +case "${1}" in + prereqs) + prereqs + exit 0 + ;; esac -log_begin_msg "$DESCRIPTION" +# live-initramfs header + +. /scripts/live-functions + +log_begin_msg "Adding live session user..." -if [ "${BUILD_SYSTEM}" == "Debian" ]; then +# live-initramfs script + +if [ "${BUILD_SYSTEM}" = "Debian" ]; then user_crypted="8Ab05sVQ4LLps" # as in `echo "live" | mkpasswd -s` else user_crypted="U6aMy0wojraho" # "ubuntu" @@ -28,6 +34,7 @@ fi # U6aMy0wojraho is just a blank password chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null < /dev/null @@ -45,6 +52,7 @@ fi # Clear out debconf database again to avoid confusing ubiquity later. chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <> /root/etc/sudoers # XXX - awful hack to stop xscreensaver locking the screen (#7150) @@ -90,9 +101,15 @@ EOF fi fi +fi + if [ -L /root/home/$USERNAME/Examples ]; then chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/ mv /root/home/$USERNAME/Examples /root/home/$USERNAME/Desktop/ fi +if [ -f "/root/usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved" ]; then + chroot /root install -D -o $USERNAME -g $USERNAME /usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved /home/$USERNAME/Desktop/about-kubuntu.desktop +fi + log_end_msg