From 9fc9e2a1a11b0edada38cb501fefe4f58aa414ac 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.2-1. --- scripts/live-bottom/10adduser | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 scripts/live-bottom/10adduser (limited to 'scripts/live-bottom/10adduser') diff --git a/scripts/live-bottom/10adduser b/scripts/live-bottom/10adduser new file mode 100755 index 0000000..9179f1b --- /dev/null +++ b/scripts/live-bottom/10adduser @@ -0,0 +1,66 @@ +#!/bin/sh + +PREREQ="" +DESCRIPTION="Adding live session user..." + +. /scripts/live-functions + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +log_begin_msg "$DESCRIPTION" + +# U6aMy0wojraho is just a blank password +chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null < /dev/null + +# Clear out debconf database again to avoid confusing ubiquity later. +chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <> /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/ +fi + +log_end_msg -- cgit v1.2.3