X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Fcasper-bottom%2F10adduser;h=e85f947fc3a1b13318538fe26497b910cf9566ad;hb=6c1a2cfab139bb4a61e7bcf5f4cafe3b7498f64e;hp=700f8c3f1d485f6ffcd6b733bee4f759f109cf65;hpb=a4a7503df76005df67b006e1324004c808830c32;p=live-boot-grml.git diff --git a/scripts/casper-bottom/10adduser b/scripts/casper-bottom/10adduser index 700f8c3..e85f947 100755 --- a/scripts/casper-bottom/10adduser +++ b/scripts/casper-bottom/10adduser @@ -20,18 +20,28 @@ esac log_begin_msg "$DESCRIPTION" +if [ "${BUILD_SYSTEM}" == "Debian" ]; then + user_crypted="8Ab05sVQ4LLps" # as in `echo "live" | mkpasswd -s` +else + user_crypted="U6aMy0wojraho" # "ubuntu" +fi + # U6aMy0wojraho is just a blank password chroot /root debconf-communicate -fnoninteractive casper > /dev/null < /dev/null +if [ "${BUILD_SYSTEM}" == "Debian" ]; then + chroot /root /usr/bin/env -i HOME="/root" \ + TERM="${TERM}" PATH="/usr/sbin:/usr/bin:/sbin:/bin" \ + /usr/lib/user-setup/user-setup-apply > /dev/null +else + chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null +fi # Clear out debconf database again to avoid confusing ubiquity later. chroot /root debconf-communicate -fnoninteractive casper > /dev/null <> /root/etc/environment + if [ "${BUILD_SYSTEM}" == "Ubuntu" ]; then + # XXX - awful hack to stop xscreensaver locking the screen (#7150) + echo 'RUNNING_UNDER_GDM="yes"' >> /root/etc/environment grep -q '^%admin' /root/etc/sudoers && sed -i -e '/^%admin/s/ALL$/NOPASSWD: ALL/' /root/etc/sudoers || echo '%admin ALL=(ALL) NOPASSWD: ALL' >> /root/etc/sudoers - for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde/ubiquity-kdeui.desktop; do - if [ -f "/root/$file" ]; then - chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file") - break - fi - done + for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde/ubiquity-kdeui.desktop; do + if [ -f "/root/$file" ]; then + chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file") + break + fi + done else # We are in debian :-) echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers fi