summaryrefslogtreecommitdiff
path: root/scripts/live-bottom
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-05-01 13:31:18 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:48:09 +0100
commitc967ebfc4e43fb16a0c2c140c66900712be95ab7 (patch)
tree74a8a142d7d6ceadcd9c4cb23ee3819fd8739336 /scripts/live-bottom
parent65721717c4e37f6cec9e66f2ac355746490338ab (diff)
downloadlive-boot-c967ebfc4e43fb16a0c2c140c66900712be95ab7.tar.gz
live-boot-c967ebfc4e43fb16a0c2c140c66900712be95ab7.zip
Merging casper 1.216.
Diffstat (limited to 'scripts/live-bottom')
-rwxr-xr-xscripts/live-bottom/10adduser29
-rwxr-xr-xscripts/live-bottom/22sslcert1
-rwxr-xr-xscripts/live-bottom/24preseed12
-rwxr-xr-xscripts/live-bottom/30accessibility21
4 files changed, 21 insertions, 42 deletions
diff --git a/scripts/live-bottom/10adduser b/scripts/live-bottom/10adduser
index c7adad2..51868d4 100755
--- a/scripts/live-bottom/10adduser
+++ b/scripts/live-bottom/10adduser
@@ -26,6 +26,7 @@ then
fi
. /scripts/live-functions
+load_confmodule
log_begin_msg "Adding live session user"
@@ -34,14 +35,12 @@ log_begin_msg "Adding live session user"
user_crypted="8Ab05sVQ4LLps" # as in $(echo "live" | mkpasswd -s)
# U6aMy0wojraho is just a blank password
-chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
-set passwd/make-user true
-set passwd/root-password-crypted *
-set passwd/user-password-crypted ${user_crypted}
-set passwd/user-fullname ${USERFULLNAME}
-set passwd/username ${USERNAME}
-set passwd/user-uid 1000
-EOF
+db_set passwd/make-user true
+db_set passwd/root-password-crypted '*'
+db_set passwd/user-password-crypted ${user_crypted}
+db_set passwd/user-fullname "$USERFULLNAME"
+db_set passwd/username "$USERNAME"
+db_set passwd/user-uid 999
chroot /root /usr/bin/env -i HOME="/root" \
TERM="${TERM}" PATH="/usr/sbin:/usr/bin:/sbin:/bin" \
@@ -49,14 +48,12 @@ chroot /root /usr/bin/env -i HOME="/root" \
| grep -v "Shadow passwords are now on"
# Clear out debconf database again to avoid confusing ubiquity later.
-chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
-set passwd/make-user
-set passwd/root-password-crypted
-set passwd/user-password-crypted
-set passwd/user-fullname
-set passwd/username
-set passwd/user-uid
-EOF
+db_set passwd/make-user
+db_set passwd/root-password-crypted
+db_set passwd/user-password-crypted
+db_set passwd/user-fullname
+db_set passwd/username
+db_set passwd/user-uid
if ! grep -qs "${USERNAME}" /root/etc/passwd
then
diff --git a/scripts/live-bottom/22sslcert b/scripts/live-bottom/22sslcert
index 1950eef..d54dc29 100755
--- a/scripts/live-bottom/22sslcert
+++ b/scripts/live-bottom/22sslcert
@@ -21,6 +21,7 @@ esac
# live-initramfs header
. /scripts/live-functions
+load_confmodule
log_begin_msg "Regenerating SSL certificate..."
diff --git a/scripts/live-bottom/24preseed b/scripts/live-bottom/24preseed
index 7dd6394..9a77ef5 100755
--- a/scripts/live-bottom/24preseed
+++ b/scripts/live-bottom/24preseed
@@ -26,6 +26,7 @@ then
fi
. /scripts/live-functions
+load_confmodule
log_begin_msg "Loading preseed file"
@@ -33,14 +34,14 @@ log_begin_msg "Loading preseed file"
if [ -e /preseed.cfg ]
then
- chroot /root debconf-set-selections < /preseed.cfg
+ live-set-selections /preseed.cfg
fi
if [ -n "${LOCATIONS}" ]
then
for item in ${LOCATIONS}
do
- chroot /root debconf-set-selections < "/root${ITEM}"
+ live-set-selections "/root$item"
done
fi
@@ -55,12 +56,9 @@ then
done
fi
-reply="$(echo "GET preseed/early_command" | chroot /root debconf-communicate -fnoninteractive live-initramfs)"
-
-if [ "${reply#0 }" != "${reply}" ]
+if db_get preseed/early_command && [ "$RET" ]
then
- reply="${reply#0 }"
- sh -c "${reply}"
+ sh -c "$RET"
fi
# Clear out debconf database backup files to save memory.
diff --git a/scripts/live-bottom/30accessibility b/scripts/live-bottom/30accessibility
index 4624077..75bfae4 100755
--- a/scripts/live-bottom/30accessibility
+++ b/scripts/live-bottom/30accessibility
@@ -109,20 +109,12 @@ case ${ACCESS} in
gct -s -t bool /desktop/gnome/interface/accessibility true
gct -s -t bool /desktop/gnome/applications/at/visual/startup true
gct -s -t string /desktop/gnome/applications/at/visual/exec orca
+ gct -s -t string /apps/empathy/conversation/theme classic
gct -s -t bool /apps/gksu/disable-grab true
gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
sed -i -e 's/# Host alias specification/Defaults\tenv_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"\n\n# Host alias specification/g' /root/etc/sudoers
remove_applet fast_user_switch
- if [ -x /root/usr/bin/pulse-session ]
- then
- mkdir -p /root/var/lib/pulseaudio
- touch /root/var/lib/pulseaudio/pulse_a11y_nostart
- chroot /root chown root.root /var/lib/pulseaudio/pulse_a11y_nostart
- mkdir -p /root/home/$USERNAME/.pulse
- echo "autospawn = no" > /root/home/$USERNAME/.pulse/client.conf
- chroot /root chown -R $USERNAME.$USERNAME /home/$USERNAME/.pulse
- fi
if [ -x /root/usr/bin/orca ]
then
mkdir -p /root/home/$USERNAME/.orca
@@ -137,6 +129,7 @@ case ${ACCESS} in
gct -s -t string /desktop/gnome/applications/at/visual/exec orca
gct -s -t bool /apps/gksu/disable-grab true
gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
+ gct -s -t string /apps/empathy/conversation/theme classic
sed -i -e 's/# Host alias specification/Defaults\tenv_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"\n\n# Host alias specification/g' /root/etc/sudoers
if [ -x /root/usr/bin/orca ]
@@ -149,16 +142,6 @@ case ${ACCESS} in
chroot /root chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.orca
fi
- if [ -x /root/usr/bin/pulse-session ]
- then
- mkdir -p /root/var/lib/pulseaudio
- touch /root/var/lib/pulseaudio/pulse_a11y_nostart
- chroot /root chown root.root /var/lib/pulseaudio/pulse_a11y_nostart
- mkdir -p /root/home/$USERNAME/.pulse
- echo "autospawn = no" > /root/home/$USERNAME/.pulse/client.conf
- chroot /root chown -R $USERNAME.$USERNAME /home/$USERNAME/.pulse
- fi
-
remove_applet fast_user_switch
;;