[Debian-live-changes] r1454 -
dists/trunk/live-initramfs/scripts/live-bottom
Daniel Baumann
daniel at alioth.debian.org
Fri May 11 10:22:45 UTC 2007
Author: daniel
Date: 2007-05-11 10:22:45 +0000 (Fri, 11 May 2007)
New Revision: 1454
Modified:
dists/trunk/live-initramfs/scripts/live-bottom/02timezone
dists/trunk/live-initramfs/scripts/live-bottom/05mountpoints
dists/trunk/live-initramfs/scripts/live-bottom/10adduser
Log:
Modified: dists/trunk/live-initramfs/scripts/live-bottom/02timezone
===================================================================
--- dists/trunk/live-initramfs/scripts/live-bottom/02timezone 2007-05-11 10:15:54 UTC (rev 1453)
+++ dists/trunk/live-initramfs/scripts/live-bottom/02timezone 2007-05-11 10:22:45 UTC (rev 1454)
@@ -1,21 +1,22 @@
-#! /bin/sh
+#!/bin/sh
+set -e
+
+DESCRIPTION="Setting timezone..."
PREREQ=""
-DESCRIPTION="Setting timezone..."
-. /scripts/live-functions
-
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
+. /scripts/live-functions
+
cp -f /root/usr/share/zoneinfo/UTC /root/etc/localtime
Modified: dists/trunk/live-initramfs/scripts/live-bottom/05mountpoints
===================================================================
--- dists/trunk/live-initramfs/scripts/live-bottom/05mountpoints 2007-05-11 10:15:54 UTC (rev 1453)
+++ dists/trunk/live-initramfs/scripts/live-bottom/05mountpoints 2007-05-11 10:22:45 UTC (rev 1454)
@@ -1,29 +1,31 @@
#!/bin/sh
+set -e
+
+DESCRIPTION="Moving mount points..."
PREREQ=""
-DESCRIPTION="Moving mount points..."
-. /scripts/live-functions
-
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
+. /scripts/live-functions
+
log_begin_msg "$DESCRIPTION"
# Move to the new root filesystem so that programs there can get at it.
-if [ ! -d /root/live_media ]; then
- mkdir -p /root/live_media
- mount -n -o move /live_media /root/live_media
+if [ ! -d /root/live_media ]
+then
+ mkdir -p /root/live_media
+ mount -n -o move /live_media /root/live_media
fi
log_end_msg
Modified: dists/trunk/live-initramfs/scripts/live-bottom/10adduser
===================================================================
--- dists/trunk/live-initramfs/scripts/live-bottom/10adduser 2007-05-11 10:15:54 UTC (rev 1453)
+++ dists/trunk/live-initramfs/scripts/live-bottom/10adduser 2007-05-11 10:22:45 UTC (rev 1454)
@@ -1,33 +1,35 @@
#!/bin/sh
+set -e
+
+DESCRIPTION="Adding live session user..."
PREREQ=""
-DESCRIPTION="Adding live session user..."
-. /scripts/live-functions
-
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
+. /scripts/live-functions
+
log_begin_msg "$DESCRIPTION"
-if [ "${BUILD_SYSTEM}" = "Debian" ]; then
- user_crypted="8Ab05sVQ4LLps" # as in `echo "live" | mkpasswd -s`
+if [ "${BUILD_SYSTEM}" = "Debian" ]
+then
+ user_crypted="8Ab05sVQ4LLps" # as in `echo "live" | mkpasswd -s`
else
- user_crypted="U6aMy0wojraho" # "ubuntu"
+ user_crypted="U6aMy0wojraho" # "ubuntu"
fi
# U6aMy0wojraho is just a blank password
-chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<EOF
+chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
set passwd/root-password-crypted *
set passwd/user-password-crypted ${user_crypted}
set passwd/user-fullname $USERFULLNAME
@@ -35,16 +37,17 @@
set passwd/user-uid 999
EOF
-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
+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
+ 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 live-initramfs > /dev/null <<EOF
+chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
set passwd/root-password-crypted
set passwd/user-password-crypted
set passwd/user-fullname
@@ -52,41 +55,49 @@
set passwd/user-uid
EOF
-if [ -f /root/etc/sudoers ]; then
- 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
- else # We are in debian :-)
- echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers
+if [ -f /root/etc/sudoers ]
+then
+ 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
- chroot /root sudo -u "$USERNAME" sh -c "echo 'SU_TO_ROOT_SU=sudo' >>/home/$USERNAME/.su-to-rootrc"
- chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gksu/sudo-mode true
- chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gksu/display-no-pass-info false
-chroot /root sudo -u "$USERNAME" sh -c "umask 0077 && mkdir -p /home/$USERNAME/.kde/share/config && cat >/home/$USERNAME/.kde/share/config/kdesurc" <<EOF
+ 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
+ chroot /root sudo -u "$USERNAME" sh -c "echo 'SU_TO_ROOT_SU=sudo' >>/home/$USERNAME/.su-to-rootrc"
+ chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gksu/sudo-mode true
+ chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gksu/display-no-pass-info false
+
+chroot /root sudo -u "$USERNAME" sh -c "umask 0077 && mkdir -p /home/$USERNAME/.kde/share/config && cat >/home/$USERNAME/.kde/share/config/kdesurc" << EOF
[super-user-command]
super-user-command=sudo
EOF
- if [ -f /root/usr/share/apps/konsole/sumc.desktop ]; then
- chroot /root sudo -u "$USERNAME" sh -c "umask 0077 && mkdir -p /home/$USERNAME/.kde/share/apps/konsole && sed -e's/Exec=su.*$/Exec=sudo mc -c/' /usr/share/apps/konsole/sumc.desktop >/home/$USERNAME/.kde/share/apps/konsole/sumc.desktop"
- fi
+ if [ -f /root/usr/share/apps/konsole/sumc.desktop ]
+ then
+ chroot /root sudo -u "$USERNAME" sh -c "umask 0077 && mkdir -p /home/$USERNAME/.kde/share/apps/konsole && sed -e's/Exec=su.*$/Exec=sudo mc -c/' /usr/share/apps/konsole/sumc.desktop >/home/$USERNAME/.kde/share/apps/konsole/sumc.desktop"
+ fi
- if [ -f /root/usr/share/apps/konsole/su.desktop ]; then
- chroot /root sudo -u "$USERNAME" sh -c "umask 0077 && mkdir -p /home/$USERNAME/.kde/share/apps/konsole && sed -e's/Exec=su.*$/Exec=sudo -i/' /usr/share/apps/konsole/su.desktop >/home/$USERNAME/.kde/share/apps/konsole/su.desktop"
+ if [ -f /root/usr/share/apps/konsole/su.desktop ]
+ then
+ chroot /root sudo -u "$USERNAME" sh -c "umask 0077 && mkdir -p /home/$USERNAME/.kde/share/apps/konsole && sed -e's/Exec=su.*$/Exec=sudo -i/' /usr/share/apps/konsole/su.desktop >/home/$USERNAME/.kde/share/apps/konsole/su.desktop"
+ fi
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/
+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
More information about the Debian-live-changes
mailing list