From 4bdaa2237c6ae923d1dd068e9024ebceca3f40d9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 14:46:36 +0200 Subject: Adding live-initramfs 1.87.1-1. --- scripts/casper-bottom/10adduser | 42 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) (limited to 'scripts/casper-bottom/10adduser') diff --git a/scripts/casper-bottom/10adduser b/scripts/casper-bottom/10adduser index af7754b..4fe9378 100755 --- a/scripts/casper-bottom/10adduser +++ b/scripts/casper-bottom/10adduser @@ -20,28 +20,16 @@ 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 -else - chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null -fi +chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null # 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 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 - else # We are in debian :-) - echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers + elif [ "${BUILD_SYSTEM}" = "Debian" ]; then + echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers fi fi +# XXX - awful hack to stop xscreensaver locking the screen (#7150) +echo 'RUNNING_UNDER_GDM="yes"' >> /root/etc/environment + +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 + 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/ -- cgit v1.2.3