[Debian-live-changes] r1457 -
dists/trunk/live-initramfs/scripts/live-bottom
Daniel Baumann
daniel at alioth.debian.org
Fri May 11 11:44:15 UTC 2007
Author: daniel
Date: 2007-05-11 11:44:15 +0000 (Fri, 11 May 2007)
New Revision: 1457
Modified:
dists/trunk/live-initramfs/scripts/live-bottom/00md5check
dists/trunk/live-initramfs/scripts/live-bottom/01live.conf
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/00md5check
===================================================================
--- dists/trunk/live-initramfs/scripts/live-bottom/00md5check 2007-05-11 11:23:49 UTC (rev 1456)
+++ dists/trunk/live-initramfs/scripts/live-bottom/00md5check 2007-05-11 11:44:15 UTC (rev 1457)
@@ -20,7 +20,6 @@
# md5check script
-# Verifying md5sum.txt
if [ -n "${MD5CHECK}" ]
then
live-md5check /live_media /live_media/md5sum.txt < /dev/tty8
Modified: dists/trunk/live-initramfs/scripts/live-bottom/01live.conf
===================================================================
--- dists/trunk/live-initramfs/scripts/live-bottom/01live.conf 2007-05-11 11:23:49 UTC (rev 1456)
+++ dists/trunk/live-initramfs/scripts/live-bottom/01live.conf 2007-05-11 11:44:15 UTC (rev 1457)
@@ -18,17 +18,19 @@
;;
esac
-# live.conf script
+# live-initramfs header
. /scripts/live-functions
-log_begin_msg "Copying config on real root fs..."
+log_begin_msg "Processing configuration file..."
+# live.conf script
+
if [ -f /etc/live.conf ]
then
if [ -n "${LIVECONF}" ]
then
- # Updating existing live.conf with bootparameter values
+ # Updating already existing live.conf with bootparameter values
sed -i -e 's/\(USERNAME="\).*"/\1'"${USERNAME}"'"/g' \
-e 's/\(USERFULLNAME="\).*"/\1'"${USERFULLNAME}"'"/g' \
-e 's/\(HOSTNAME="\).*"/\1'"${HOSTNAME}"'"/g' \
@@ -47,3 +49,5 @@
EOF
fi
+
+log_end_msg
Modified: dists/trunk/live-initramfs/scripts/live-bottom/02timezone
===================================================================
--- dists/trunk/live-initramfs/scripts/live-bottom/02timezone 2007-05-11 11:23:49 UTC (rev 1456)
+++ dists/trunk/live-initramfs/scripts/live-bottom/02timezone 2007-05-11 11:44:15 UTC (rev 1457)
@@ -18,10 +18,14 @@
;;
esac
-# timezone
+# live-initramfs header
. /scripts/live-functions
-DESCRIPTION="Setting timezone..."
+log_begin_msg "Setting timezone..."
+# timezone script
+
cp -f /root/usr/share/zoneinfo/UTC /root/etc/localtime
+
+log_end_msg
Modified: dists/trunk/live-initramfs/scripts/live-bottom/05mountpoints
===================================================================
--- dists/trunk/live-initramfs/scripts/live-bottom/05mountpoints 2007-05-11 11:23:49 UTC (rev 1456)
+++ dists/trunk/live-initramfs/scripts/live-bottom/05mountpoints 2007-05-11 11:44:15 UTC (rev 1457)
@@ -18,13 +18,13 @@
;;
esac
-# mountpoints
+# live-initramfs header
. /scripts/live-functions
-DESCRIPTION="Moving mount points..."
+log_begin_msg "Moving mount points..."
-log_begin_msg "$DESCRIPTION"
+# mountpoints script
# Move to the new root filesystem so that programs there can get at it.
if [ ! -d /root/live_media ]
Modified: dists/trunk/live-initramfs/scripts/live-bottom/10adduser
===================================================================
--- dists/trunk/live-initramfs/scripts/live-bottom/10adduser 2007-05-11 11:23:49 UTC (rev 1456)
+++ dists/trunk/live-initramfs/scripts/live-bottom/10adduser 2007-05-11 11:44:15 UTC (rev 1457)
@@ -18,38 +18,41 @@
;;
esac
-# adduser
+# live-initramfs header
. /scripts/live-functions
-DESCRIPTION="Adding live session user..."
+log_begin_msg "Adding live session user..."
-log_begin_msg "$DESCRIPTION"
+# adduser script
-if [ "${BUILD_SYSTEM}" = "Debian" ]
-then
- user_crypted="8Ab05sVQ4LLps" # as in `echo "live" | mkpasswd -s`
-else
- user_crypted="U6aMy0wojraho" # "ubuntu"
-fi
+# Setting password as in 'echo foo | mkpasswd -s'
+case "${BUILD_SYSTEM}" in
+ Debian)
+ # live
+ PASSWORD="8Ab05sVQ4LLps"
+ ;;
-# U6aMy0wojraho is just a blank password
+ Ubuntu)
+ # ubuntu
+ PASSWORD="U6aMy0wojraho"
+ ;;
+
+ *)
+ # blank password
+ PASSWORD="U6aMy0wojraho"
+ ;;
+esac
+
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
-set passwd/username $USERNAME
+set passwd/user-password-crypted ${PASSWORD}
+set passwd/user-fullname ${USERFULLNAME}
+set passwd/username ${USERNAME}
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
-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 live-initramfs > /dev/null << EOF
More information about the Debian-live-changes
mailing list