Adding upstream version 1.107.1. upstream/1.107.1
authorDaniel Baumann <daniel@debian.org>
Sun, 18 Apr 2010 18:41:41 +0000 (20:41 +0200)
committerDaniel Baumann <daniel@debian.org>
Sun, 18 Apr 2010 18:41:41 +0000 (20:41 +0200)
32 files changed:
Makefile
bin/live-preseed
bin/live-reconfigure
bin/live-snapshot
docs/ChangeLog.casper
docs/parameters.txt
manpages/live-initramfs.en.7.txt
scripts/live
scripts/live-bottom/01integrity_check
scripts/live-bottom/02etc_live_conf
scripts/live-bottom/02timezone
scripts/live-bottom/10adduser
scripts/live-bottom/12fstab
scripts/live-bottom/13swap
scripts/live-bottom/15autologin
scripts/live-bottom/18hostname
scripts/live-bottom/19keyboard
scripts/live-bottom/20xconfig
scripts/live-bottom/22gnome_panel_data
scripts/live-bottom/22screensaver
scripts/live-bottom/23etc_modules
scripts/live-bottom/23networking
scripts/live-bottom/24preseed
scripts/live-bottom/25configure_init
scripts/live-bottom/30accessibility
scripts/live-bottom/32disable_hibernation
scripts/live-bottom/33enable_apport_crashes
scripts/live-bottom/36disable_trackerd [new file with mode: 0755]
scripts/live-bottom/40install_driver_updates
scripts/live-functions
scripts/live-helpers
scripts/live-premount/10driver_updates

index d2381f1..459605d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -108,10 +108,10 @@ uninstall:
 update:
        set -e; for FILE in docs/parameters.txt; \
        do \
-               sed -i  -e 's/2007\\-09\\-24/2007\\-10\\-01/' \
-                       -e 's/2007-09-24/2007-10-01/' \
-                       -e 's/24.09.2007/01.10.2007/' \
-                       -e 's/1.104.1/1.104.2/' \
+               sed -i  -e 's/2007\\-10\\-01/2007\\-10\\-08/' \
+                       -e 's/2007-10-01/2007-10-08/' \
+                       -e 's/01.10.2007/08.10.2007/' \
+                       -e 's/1.107.1/1.107.2/' \
                $$FILE; \
        done
 
index 3bdd8ce..36154ea 100755 (executable)
@@ -4,20 +4,20 @@ set -e
 
 PATH=/usr/sbin:/usr/bin:/sbin:/bin
 
-root="$1"
-question="$2"
-value="$3"
-seen="$4"
+root="${1}"
+question="${2}"
+value="${3}"
+seen="${4}"
 
-[ "$seen" ] || seen=true
+[ "${seen}" ] || seen=true
 
-if ! (echo "SET $question $value"; echo "FSET $question seen $seen") | chroot "$1" debconf-communicate -fnoninteractive live-initramfs >/dev/null
+if ! (echo "SET ${question} ${value}"; echo "FSET ${question} seen ${seen}") | chroot "${1}" debconf-communicate -fnoninteractive live-initramfs >/dev/null
 then
 
-chroot "$1" debconf-communicate -fnoninteractive live-initramfs >/dev/null << EOF
-REGISTER debian-installer/dummy $question
-SET $question $value
-FSET $question seen $seen
+chroot "${1}" debconf-communicate -fnoninteractive live-initramfs >/dev/null << EOF
+REGISTER debian-installer/dummy ${question}
+SET ${question} ${value}
+FSET ${question} seen ${seen}
 EOF
 
 fi
index 565bdea..16cb51d 100755 (executable)
@@ -8,31 +8,31 @@ frontend=noninteractive
 
 findcommandinroot ()
 {
-       ROOT="$1/"
+       ROOT="${1}/"
        shift
 
-       while [ "$#" -ge 1 ]
+       while [ "${#}" -ge 1 ]
        do
-               P="$PATH"
+               P="${PATH}"
 
-               while [ "$P" ]
+               while [ "${P}" ]
                do
                        D=${P%%:*}
                        P=${P#*:}
 
-                       if [ "$D" = "$P" ]
+                       if [ "${D}" = "${P}" ]
                        then
                                P=
                        fi
 
-                       if [ -z "$D" ]
+                       if [ -z "${D}" ]
                        then
                                D=.
                        fi
 
-                       if [ -x "$ROOT$D/$1" ]
+                       if [ -x "${ROOT}${D}/${1}" ]
                        then
-                               echo "$D/$1"
+                               echo "${D}/${1}"
                                return 0
                        fi
                done
@@ -45,26 +45,26 @@ findcommandinroot ()
 
 runcommandinroot ()
 {
-       C=$(findcommandinroot "$1" "$2")
-       ROOT="$1"
+       C=$(findcommandinroot "${1}" "${2}")
+       ROOT="${1}"
 
        shift
        shift
 
-       [ -n "$C" ] && chroot "$ROOT" "$C" "$@"
+       [ -n "${C}" ] && chroot "${ROOT}" "${C}" "${@}"
 }
 
-root="$1"
-package="$2"
+root="${1}"
+package="${2}"
 
-version=$(runcommandinroot "$root" dpkg-query -W --showformat='${Version}' "$package" 2>/dev/null) || version=""
+version=$(runcommandinroot "${root}" dpkg-query -W --showformat='${Version}' "${package}" 2>/dev/null) || version=""
 
-if [ -z "$version" ]
+if [ -z "${version}" ]
 then
-       echo >&2 "$0: package '$package' is not installed"
+       echo >&2 "${0}: package '${package}' is not installed"
        exit 0
 fi
 
-runcommandinroot "$root" dpkg-reconfigure -fnoninteractive --no-reload "$package"
+runcommandinroot "${root}" dpkg-reconfigure -fnoninteractive --no-reload "${package}"
 
 exit 0
index 17349fc..e508c2a 100755 (executable)
@@ -25,7 +25,7 @@
 # On Debian systems, the complete text of the GNU General Public License
 # can be found in /usr/share/common-licenses/GPL-2 file.
 
-PROGRAM="`basename $0`"
+PROGRAM="$(basename $0)"
 VERSION=0.0.1
 
 # Source live conf
@@ -99,7 +99,7 @@ Help ()
        echo "Options:"
        echo "  -c, --cow: specifies the copy on write directory (default: /live/cow)."
        echo "  -d, --device: specifies the output snapshot device (default: none)."
-       echo "  -o, --output: specifies the output image file (default: $type dependent)."
+       echo "  -o, --output: specifies the output image file (default: ${type} dependent)."
     echo "  -r, --resync-string: internally used to resync previous made snapshots."
        echo "  -t, --type: specifies the snapshot type between \"squashfs\", \"ext2\", \"ext3\" or \"cpio\".gz archive (default: cpio)"
     echo -e "\nLook at live-snapshot(1) man page for more information."
@@ -150,8 +150,8 @@ Do_snapshot ()
                        ;;
 
                ext2|ext3)
-                       DU_DIM="`du -ks ${COW} | cut -f1`"
-                       REAL_DIM="`expr ${DU_DIM} + ${DU_DIM} / 20`" # Just 5% more to be sure, need something more sophistcated here...
+                       DU_DIM="$(du -ks ${COW} | cut -f1)"
+                       REAL_DIM="$(expr ${DU_DIM} + ${DU_DIM} / 20)" # Just 5% more to be sure, need something more sophistcated here...
                        genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root="${COW}" "${DEST}" || exit 1
                        ;;
 
@@ -164,8 +164,8 @@ Do_snapshot ()
 
 Is_same_mount ()
 {
-       dir1="`Base_path $1`"
-       dir2="`Base_path $2`"
+       dir1="$(Base_path ${1})"
+       dir2="$(Base_path ${2})"
 
        if [ "${dir1}" = "${dir2}" ]
        then
@@ -178,10 +178,10 @@ Is_same_mount ()
 Parse_args ()
 {
        # Parse command line
-       ARGS="$1"
-       ARGUMENTS="`getopt --longoptions cow:,device:,output,resync-string:,type:,help,usage,version --name=${PROGRAM} --options c:d:o:t:r:,h,u,v --shell sh -- ${ARGS}`"
+       ARGS="${1}"
+       ARGUMENTS="$(getopt --longoptions cow:,device:,output,resync-string:,type:,help,usage,version --name=${PROGRAM} --options c:d:o:t:r:,h,u,v --shell sh -- ${ARGS})"
 
-       if [ "$?" != "0" ]
+       if [ "${?}" != "0" ]
        then
                echo "Terminating." >&2
                exit 1
@@ -191,29 +191,29 @@ Parse_args ()
 
        while true
        do
-               case "$1" in
+               case "${1}" in
                        -c|--cow)
-                               SNAP_COW="$2"
+                               SNAP_COW="${2}"
                                shift 2
                                ;;
 
                        -d|--device)
-                               SNAP_DEV="$2"
+                               SNAP_DEV="${2}"
                                shift 2
                                ;;
 
                        -o|--output)
-                               SNAP_OUTPUT="$2"
+                               SNAP_OUTPUT="${2}"
                                shift 2
                                ;;
 
                        -t|--type)
-                               SNAP_TYPE="$2"
+                               SNAP_TYPE="${2}"
                                shift 2
                                ;;
 
                        -r|--resync-string)
-                               SNAP_RSTRING="$2"
+                               SNAP_RSTRING="${2}"
                                break
                                ;;
 
@@ -243,7 +243,7 @@ Parse_args ()
 
 Mount_device ()
 {
-       dev="$1"
+       dev="${1}"
 
        if [ ! -d "${MOUNTP}" ]
        then
@@ -255,9 +255,9 @@ Mount_device ()
                # create a temp
                mount -t tmpfs -o rw tmpfs "${MOUNTP}"
 
-               if [ ! -L /home/$USERNAME/Desktop/live-snapshot ]
+               if [ ! -L /home/${USERNAME}/Desktop/live-snapshot ]
                then
-                       ln -s "${MOUNTP}" /home/$USERNAME/Desktop/live-snapshot
+                       ln -s "${MOUNTP}" /home/${USERNAME}/Desktop/live-snapshot
                fi
        else
                if [ -b "${dev}" ]
@@ -274,7 +274,7 @@ Defaults ()
        DEV=""
        DEST="${MOUNTP}/live-sn.cpio.gz"
        TYPE="cpio"
-       DESKTOP_LINK=/home/$USERNAME/Desktop/live-snapshot
+       DESKTOP_LINK=/home/${USERNAME}/Desktop/live-snapshot
 
        if [ -n "${SNAP_RSTRING}" ]
        then
@@ -334,12 +334,12 @@ Defaults ()
                Usage "Error: ${COW} is not a directory"
        fi
 
-       Mount_device $DEV
+       Mount_device ${DEV}
 }
 
 Clean ()
 {
-       if [ -n "$DEV" ]
+       if [ -n "${DEV}" ]
        then
                umount "${MOUNTP}"
                rmdir "${MOUNTP}"
@@ -349,10 +349,10 @@ Clean ()
 
 Main ()
 {
-       Parse_args "$@"
+       Parse_args "${@}"
        Defaults
        Do_snapshot
        Clean
 }
 
-Main "$@"
+Main "${@}"
index cfba971..b1f55c9 100644 (file)
@@ -1,3 +1,36 @@
+casper (1.107) gutsy; urgency=low
+
+  * Fix gconf keys for suspend and hibernate (thanks, Oliver Grawert;
+    LP: #144790).
+  * Enable suspend again since as far as I can see we no longer need to
+    probe DMI while figuring out whether to enable it (see #61535).
+  * Add a 'textonly' boot option to disable X (LP: #65818).
+  * Write the please-remove-CD message to /dev/console so that it works even
+    if usplash isn't running, and make sure to set /dev/console into a sane
+    state so that pressing Enter doesn't just result in ^M being displayed.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Tue, 02 Oct 2007 15:12:57 +0100
+
+casper (1.106) gutsy; urgency=low
+
+  * Support preseed/early_command; code supplied here will be run using 'sh
+    -c' from casper-bottom, and can chroot to /root if needed (LP: #144845).
+  * Make sure we don't accidentally continue to boot if casper-md5check
+    fails (LP: #82856).
+  * Clear out debconf database backup files after preseeding to save memory
+    (LP: #43706).
+  * Mount everything as noatime to avoid unnecessary metadata writes.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 28 Sep 2007 15:27:52 +0100
+
+casper (1.105) gutsy; urgency=low
+
+  * scripts/casper-bottom/36disable_trackerd: Disable trackerd in the live
+    session; it's not very useful in this context and it uses a fair bit of
+    memory.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Mon, 24 Sep 2007 17:25:50 +0100
+
 casper (1.104) gutsy; urgency=low
 
   * casper-md5check: Fall back to text output if opening the usplash FIFO
index 07ef731..bbf1157 100644 (file)
@@ -1,7 +1,7 @@
 Boot Parameters for Debian Live
 -------------------------------
 
-Updated for live-initramfs 1.104.1-1 on 2007-09-24.
+Updated for live-initramfs 1.107.1-1 on 2007-10-01.
 
 These options (can be combined) work from the bootloader prompt:
 
index a52f025..c197abb 100644 (file)
@@ -219,6 +219,10 @@ This parameter will make live-initramfs to show on "/" the ro filesystems
 lead to problems by applications like "mono" which store binary paths on
 installation.
 
+  textonly
+
+Start up to text-mode shell prompts, disabling the graphical user interface.
+
   timezone=**TIMEZONE**::
 
 By default, timezone is set to UTC. Using the timezone parameter, you can set it
index b883c92..b1157c5 100755 (executable)
@@ -36,7 +36,7 @@ Arguments ()
 {
        PRESEEDS=""
 
-       for ARGUMENT in `cat /proc/cmdline`
+       for ARGUMENT in $(cat /proc/cmdline)
        do
                case "${ARGUMENT}" in
                        access=*)
@@ -314,14 +314,14 @@ Arguments ()
 
                                mkdir -p /root/var/run/network
                                chroot /root ifup -a
-                               chroot /root wget -P /tmp "$location"
+                               chroot /root wget -P /tmp "${location}"
                                chroot /root ifdown -a
 
                                umount /root/sys
                                umount /root/proc
                                umount /root/dev
 
-                               LOCATION="/tmp/$(basename "$location")"
+                               LOCATION="/tmp/$(basename "${location}")"
                                ;;
 
                        */*=*)
@@ -336,6 +336,11 @@ Arguments ()
                                export SHOWMOUNTS
                                ;;
 
+                       textonly)
+                               TEXTONLY="Yes"
+                               export TEXTONLY
+                               ;;
+
                        timezone=*)
                                TIMEZONE="${ARGUMENT#timezone=}"
                                export TIMEZONE
@@ -419,7 +424,7 @@ is_live_path ()
        then
                for FILESYSTEM in squashfs ext2 ext3 xfs dir
                do
-                       if [ "`echo ${DIRECTORY}/${LIVE_MEDIA_PATH}/*.${FILESYSTEM}`" != "${DIRECTORY}/${LIVE_MEDIA_PATH}/*.${FILESYSTEM}" ]
+                       if [ "$(echo ${DIRECTORY}/${LIVE_MEDIA_PATH}/*.${FILESYSTEM})" != "${DIRECTORY}/${LIVE_MEDIA_PATH}/*.${FILESYSTEM}" ]
                        then
                                return 0
                        fi
@@ -431,9 +436,9 @@ is_live_path ()
 
 get_backing_device ()
 {
-       case "$1" in
+       case "${1}" in
                *.squashfs|*.ext2|*.ext3)
-                       echo $(setup_loop "$1" "loop" "/sys/block/loop*" '0' "${LIVE_MEDIA_ENCRYPTION}")
+                       echo $(setup_loop "${1}" "loop" "/sys/block/loop*" '0' "${LIVE_MEDIA_ENCRYPTION}")
                        ;;
 
                *.dir)
@@ -441,17 +446,17 @@ get_backing_device ()
                        ;;
 
                *)
-                       panic "Unrecognized live filesystem: $1"
+                       panic "Unrecognized live filesystem: ${1}"
                        ;;
        esac
 }
 
 match_files_in_dir ()
 {
-       # Does any files match pattern $1 ?
-       local pattern="$1"
+       # Does any files match pattern ${1} ?
+       local pattern="${1}"
 
-       if [ "$(echo $pattern)" != "$pattern" ]
+       if [ "$(echo ${pattern})" != "${pattern}" ]
        then
                return 0
        fi
@@ -461,15 +466,15 @@ match_files_in_dir ()
 
 mount_images_in_directory ()
 {
-       directory="$1"
-       rootmnt="$2"
+       directory="${1}"
+       rootmnt="${2}"
 
-       if match_files_in_dir "$directory/${LIVE_MEDIA_PATH}/*.squashfs" ||
-               match_files_in_dir "$directory/${LIVE_MEDIA_PATH}/*.ext2" ||
-               match_files_in_dir "$directory/${LIVE_MEDIA_PATH}/*.ext3" ||
-               match_files_in_dir "$directory/${LIVE_MEDIA_PATH}/*.dir"
+       if match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.squashfs" ||
+               match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.ext2" ||
+               match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.ext3" ||
+               match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.dir"
        then
-               setup_unionfs "$directory/${LIVE_MEDIA_PATH}" "$rootmnt"
+               setup_unionfs "${directory}/${LIVE_MEDIA_PATH}" "${rootmnt}"
        else
                :
        fi
@@ -517,7 +522,7 @@ copy_live_to ()
                then
                        size=$( expr $(ls -la ${MODULETORAMFILE} | awk '{print $5}') / 1024 + 5000 )
                else
-                       log_warning_msg "Error: toram-module $MODULETORAM ($MODULETORAMFILE) could not be read."
+                       log_warning_msg "Error: toram-module ${MODULETORAM} (${MODULETORAMFILE}) could not be read."
                        return 1
                fi
        fi
@@ -546,7 +551,7 @@ copy_live_to ()
 
        if [ "${freespace}" -lt "${size}" ]
        then
-               [ "$quiet" != "y" ] && log_warning_msg "Not enough free ${free_string} (${freespace}k free, ${size}k needed) to copy live media in ${copytodev}."
+               [ "${quiet}" != "y" ] && log_warning_msg "Not enough free ${free_string} (${freespace}k free, ${size}k needed) to copy live media in ${copytodev}."
                return 1
        fi
 
@@ -555,7 +560,7 @@ copy_live_to ()
        echo "mount -t ${fstype} ${mount_options} ${dev} ${copyto}"
        mount -t "${fstype}" ${mount_options} "${dev}" "${copyto}"
 
-       if [ "$extension" = "tgz" ]
+       if [ "${extension}" = "tgz" ]
        then
                cd "${copyto}"
                tar zxf "${copyfrom}/${LIVE_MEDIA_PATH}/$(basename ${FETCH})"
@@ -591,9 +596,9 @@ do_netmount ()
        ipconfig ${DEVICE} | tee /netboot.config
 
        # source relevant ipconfig output
-       OLDHOSTNAME=$HOSTNAME
+       OLDHOSTNAME=${HOSTNAME}
        . /tmp/net-${DEVICE}.conf
-       [ -z $HOSTNAME ] && HOSTNAME=$OLDHOSTNAME
+       [ -z ${HOSTNAME} ] && HOSTNAME=${OLDHOSTNAME}
        export HOSTNAME
 
        if [ "${NFSROOT}" = "auto" ]
@@ -607,12 +612,12 @@ do_netmount ()
                return ${rc}
        fi
 
-       if [ "${NFSROOT#*:}" = "$NFSROOT" ] && [ "$NETBOOT" != "cifs" ]
+       if [ "${NFSROOT#*:}" = "${NFSROOT}" ] && [ "$NETBOOT" != "cifs" ]
        then
                NFSROOT=${ROOTSERVER}:${NFSROOT}
        fi
 
-       [ "$quiet" != "y" ] && log_begin_msg "Trying netboot from ${NFSROOT}"
+       [ "${quiet}" != "y" ] && log_begin_msg "Trying netboot from ${NFSROOT}"
 
        if [ "${NETBOOT}" != "nfs" ] && do_cifsmount
        then
@@ -624,26 +629,26 @@ do_netmount ()
                rc=0
        fi
 
-       [ "$quiet" != "y" ] && log_end_msg
+       [ "${quiet}" != "y" ] && log_end_msg
        return ${rc}
 }
 
 do_httpmount ()
 {
        rc=1
-       extension=`echo "${FETCH}" | sed 's/\(.*\)\.\(.*\)/\2/'`
+       extension=$(echo "${FETCH}" | sed 's/\(.*\)\.\(.*\)/\2/')
 
        case "${extension}" in
                squashfs|tgz|tar)
-                       [ "$quiet" != "y" ] && log_begin_msg "Trying wget ${FETCH} -O ${mountpoint}/$(basename ${FETCH})"
+                       [ "${quiet}" != "y" ] && log_begin_msg "Trying wget ${FETCH} -O ${mountpoint}/$(basename ${FETCH})"
                        mkdir -p "${mountpoint}/${LIVE_MEDIA_PATH}"
                        wget "${FETCH}" -O "${mountpoint}/${LIVE_MEDIA_PATH}/$(basename ${FETCH})"
-                       [ $? -eq 0 ] && rc=0
-                       [ "${extension}" == "tgz" ] && live_dest="ram"
+                       [ ${?} -eq 0 ] && rc=0
+                       [ "${extension}" = "tgz" ] && live_dest="ram"
                        ;;
 
                *)
-                       [ "$quiet" != "y" ] && log_begin_msg "Unrecognized archive extension for ${FETCH}"
+                       [ "${quiet}" != "y" ] && log_begin_msg "Unrecognized archive extension for ${FETCH}"
        esac
 
        return ${rc}
@@ -660,7 +665,7 @@ do_nfsmount ()
                NFSOPTS=""
        fi
 
-       [ "$quiet" != "y" ] && log_begin_msg "Trying nfsmount -o nolock -o ro ${NFSOPTS} ${NFSROOT} ${mountpoint}"
+       [ "${quiet}" != "y" ] && log_begin_msg "Trying nfsmount -o nolock -o ro ${NFSOPTS} ${NFSROOT} ${mountpoint}"
 
        # FIXME: This for loop is an ugly HACK round an nfs bug
        for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13
@@ -685,7 +690,7 @@ do_cifsmount ()
                        CIFSOPTS="${NFSOPTS}"
                fi
 
-               [ "$quiet" != "y" ] && log_begin_msg "Trying mount.cifs ${NFSROOT} ${mountpoint} ${CIFSOPTS}"
+               [ "${quiet}" != "y" ] && log_begin_msg "Trying mount.cifs ${NFSROOT} ${mountpoint} ${CIFSOPTS}"
                modprobe "${MP_QUIET}" cifs
 
                if mount.cifs "${NFSROOT}" "${mountpoint}" "${CIFSOPTS}"
@@ -727,7 +732,7 @@ do_snap_copy ()
                if [ -n "${fstype}" ]
                then
                        # Copying stuff...
-                       mount -t "${fstype}" -o ro "${fromdev}" "${tomount}"
+                       mount -t "${fstype}" -o ro,noatime "${fromdev}" "${tomount}"
                        cp -a "${tomount}"/* ${todir}
                        umount "${tomount}"
                else
@@ -745,13 +750,13 @@ do_snap_copy ()
        else
                return 1
 
-               [ "$quiet" != "y" ] && log_warning_msg "Unable to find the snapshot ${snap_type} medium"
+               [ "${quiet}" != "y" ] && log_warning_msg "Unable to find the snapshot ${snap_type} medium"
        fi
 }
 
 try_snap ()
 {
-       # Look for $snap_label.* in block devices and copy the contents to $snap_mount
+       # Look for ${snap_label}.* in block devices and copy the contents to ${snap_mount}
        # and remember the device and filename for resync on exit in live-initramfs.init
 
        snap_label="${1}"
@@ -823,8 +828,8 @@ try_snap ()
 
 setup_unionfs ()
 {
-       image_directory="$1"
-       rootmnt="$2"
+       image_directory="${1}"
+       rootmnt="${2}"
 
        modprobe "${MP_QUIET}" -b ${UNIONTYPE}
 
@@ -838,7 +843,7 @@ setup_unionfs ()
        # Let's just mount the read-only file systems first
        rofsstring=""
        rofslist=""
-       minor_kernel_version=`uname -r|cut -c 5-|sed 's/[^0-9].*//'`
+       minor_kernel_version=$(uname -r|cut -c 5-|sed 's/[^0-9].*//')
 
        if [ "${NETBOOT}" = "nfs" ] && [ "${minor_kernel_version}" -lt 22 ]
        then
@@ -851,15 +856,15 @@ setup_unionfs ()
        # Read image names from ${MODULE}.module if it exists
        if [ -e "${image_directory}/filesystem.${MODULE}.module" ]
        then
-               for IMAGE in `cat ${image_directory}/filesystem.${MODULE}.module`
+               for IMAGE in $(cat ${image_directory}/filesystem.${MODULE}.module)
                do
-                       image_string="${image_string} ${image_directory}/${image}"
+                       image_string="${image_string} ${image_directory}/${IMAGE}"
                done
        elif [ -e "${image_directory}/${MODULE}.module" ]
        then
-               for IMAGE in `cat ${image_directory}/${MODULE}.module`
+               for IMAGE in $(cat ${image_directory}/${MODULE}.module)
                do
-                       image_string="${image_string} ${image_directory}/${image}"
+                       image_string="${image_string} ${image_directory}/${IMAGE}"
                done
        else
                # ${MODULE}.module does not exist, create a list of images
@@ -875,7 +880,7 @@ setup_unionfs ()
                done
 
                # Now sort the list
-               image_string="`echo ${image_string} | sed -e 's/ /\n/g' | sort `"
+               image_string="$(echo ${image_string} | sed -e 's/ /\n/g' | sort )"
        fi
 
        [ -n "${MODULETORAMFILE}" ] && image_string="${image_directory}/$(basename ${MODULETORAMFILE})"
@@ -893,7 +898,7 @@ setup_unionfs ()
                        rofslist="${image} ${rofslist}"
                elif [ -f "${image}" ]
                then
-                       backdev=$(get_backing_device "$image")
+                       backdev=$(get_backing_device "${image}")
                        fstype=$(get_fstype "${backdev}")
 
                        if [ "${fstype}" = "unknown" ]
@@ -902,8 +907,8 @@ setup_unionfs ()
                        fi
 
                        mkdir -p "${croot}/${imagename}"
-                       echo "debug: Can not mount backdev $backdev (image = $image) on croot/imagename ${croot}/${imagename}"
-                       mount -t "${fstype}" -o ro "${backdev}" "${croot}/${imagename}" || panic "Can not mount $backdev ($image) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" && rofslist="${croot}/${imagename} ${rofslist}"
+                       echo "debug: Can not mount backdev ${backdev} (image = ${image}) on croot/imagename ${croot}/${imagename}"
+                       mount -t "${fstype}" -o ro,noatime "${backdev}" "${croot}/${imagename}" || panic "Can not mount ${backdev} (${image}) on ${croot}/${imagename}" && rofsstring="${croot}/${imagename}=${roopt}:${rofsstring}" && rofslist="${croot}/${imagename} ${rofslist}"
                fi
        done
 
@@ -923,13 +928,13 @@ setup_unionfs ()
                        cowdevice=${cowprobe}
                        cow_fstype=$(get_fstype "${cowprobe}")
                else
-                       [ "$quiet" != "y" ] && log_warning_msg "Unable to find the persistent medium"
+                       [ "${quiet}" != "y" ] && log_warning_msg "Unable to find the persistent medium"
                fi
        fi
 
-       mount ${cowdevice} -t ${cow_fstype} -o rw /cow || panic "Can not mount $cowdevice on /cow"
+       mount ${cowdevice} -t ${cow_fstype} -o rw,noatime /cow || panic "Can not mount ${cowdevice} on /cow"
 
-       mount -t ${UNIONTYPE} -o dirs=/cow=rw:$rofsstring ${UNIONTYPE} "$rootmnt" || panic "${UNIONTYPE} mount failed"
+       mount -t ${UNIONTYPE} -o noatime,dirs=/cow=rw:${rofsstring} ${UNIONTYPE} "${rootmnt}" || panic "${UNIONTYPE} mount failed"
 
        # Adding other custom mounts
        if [ -n "${PERSISTENT}" ]
@@ -940,10 +945,10 @@ setup_unionfs ()
 
                if [ -b "${homecow}" ]
                then
-                       mount -t $(get_fstype "${homecow}") -o rw "${homecow}" "${rootmnt}/home"
+                       mount -t $(get_fstype "${homecow}") -o rw,noatime "${homecow}" "${rootmnt}/home"
                        export HOMEMOUNTED=1 # used to proper calculate free space in do_snap_copy()
                else
-                       [ "$quiet" != "y" ] && log_warning_msg "Unable to find the persistent home medium"
+                       [ "${quiet}" != "y" ] && log_warning_msg "Unable to find the persistent home medium"
                fi
 
                # Look for other snapshots to copy in
@@ -971,7 +976,7 @@ setup_unionfs ()
 
        # shows cow fs on /cow for use by live-snapshot
        mkdir -p "${rootmnt}/live/cow"
-       mount -o bind /cow "${rootmnt}/live/cow"
+       mount -o move /cow "${rootmnt}/live/cow"
 }
 
 check_dev ()
@@ -994,14 +999,14 @@ check_dev ()
 
        if is_supported_fs ${fstype}
        then
-               mount -t ${fstype} -o ro "${devname}" $mountpoint || continue
+               mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
 
-               if is_live_path $mountpoint
+               if is_live_path ${mountpoint}
                then
-                       echo $mountpoint
+                       echo ${mountpoint}
                        return 0
                else
-                       umount $mountpoint
+                       umount ${mountpoint}
                fi
        fi
 
@@ -1098,10 +1103,10 @@ mountroot ()
        Arguments
 
        set_usplash_timeout
-       [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-premount"
+       [ "${quiet}" != "y" ] && log_begin_msg "Running /scripts/live-premount"
        pulsate
        run_scripts /scripts/live-premount
-       [ "$quiet" != "y" ] && log_end_msg
+       [ "${quiet}" != "y" ] && log_end_msg
 
        # Needed here too because some things (*cough* udev *cough*)
        # changes the timeout
@@ -1120,7 +1125,7 @@ mountroot ()
                # Scan local devices for the image
                for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
                do
-                       livefs_root=$(find_livefs $i)
+                       livefs_root=$(find_livefs ${i})
 
                        if [ -n "${livefs_root}" ]
                        then
@@ -1153,7 +1158,7 @@ mountroot ()
 
        if [ -n "${MODULETORAMFILE}" ]
        then
-               setup_unionfs "${livefs_root}" "$rootmnt"
+               setup_unionfs "${livefs_root}" "${rootmnt}"
        else
                mount_images_in_directory "${livefs_root}" "${rootmnt}"
        fi
@@ -1161,11 +1166,11 @@ mountroot ()
        log_end_msg
 
        maybe_break live-bottom
-       [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-bottom"
+       [ "${quiet}" != "y" ] && log_begin_msg "Running /scripts/live-bottom"
 
        pulsate
        run_scripts /scripts/live-bottom
-       [ "$quiet" != "y" ] && log_end_msg
+       [ "${quiet}" != "y" ] && log_end_msg
 
        exec 1>&6 6>&-
        exec 2>&7 7>&-
index 4ac847f..e4710f3 100755 (executable)
@@ -20,7 +20,10 @@ esac
 
 # live-initramfs script
 
-grep -qs integrity-check /proc/cmdline || exit 0
-
-cd /live/image
-md5sum -c md5sum.txt < /dev/tty8
+if grep -qs integrity-check /proc/cmdline
+then
+       cd /live/image
+       md5sum -c md5sum.txt < /dev/tty8 > /dev/tty8
+       reboot
+       while :; do sleep 60; done
+fi
index 48b12d1..1623de8 100755 (executable)
@@ -41,9 +41,9 @@ then
 else
 
 cat > /root/etc/live.conf << EOF
-export USERNAME="$USERNAME"
-export USERFULLNAME="$USERFULLNAME"
-export HOSTNAME="$HOSTNAME"
+export USERNAME="${USERNAME}"
+export USERFULLNAME="${USERFULLNAME}"
+export HOSTNAME="${HOSTNAME}"
 EOF
 
 fi
index e272da9..e4e91ff 100755 (executable)
@@ -37,8 +37,8 @@ then
        zone="$(echo ${TIMEZONE} | cut -f2 -d '/')"
 
 chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
-set tzdata/Areas $area
-set tzdata/Zones/$area $zone
+set tzdata/Areas ${area}
+set tzdata/Zones/${area} ${zone}
 EOF
 
        cp -f /root/usr/share/zoneinfo/${area}/${zone} /root/etc/localtime
index 4c83fa3..d76f143 100755 (executable)
@@ -33,7 +33,7 @@ log_begin_msg "Adding live session user..."
 
 if [ "${BUILD_SYSTEM}" = "Debian" ]
 then
-       user_crypted="8Ab05sVQ4LLps" # as in `echo "live" | mkpasswd -s`
+       user_crypted="8Ab05sVQ4LLps" # as in $(echo "live" | mkpasswd -s)
 else
        user_crypted="U6aMy0wojraho" # "ubuntu"
 fi
@@ -43,8 +43,8 @@ chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<
 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-fullname ${USERFULLNAME}
+set passwd/username ${USERNAME}
 set passwd/user-uid 999
 EOF
 
@@ -80,9 +80,9 @@ then
 
                        for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde/ubiquity-kdeui.desktop
                        do
-                               if [ -f "/root/$file" ]
+                               if [ -f "/root/${file}" ]
                                then
-                                       chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file")
+                                       chroot /root install -D -o ${USERNAME} -g ${USERNAME} ${file} /home/${USERNAME}/Desktop/$(basename "${file}")
                                        break
                                fi
                        done
@@ -112,15 +112,15 @@ EOF
        fi
 fi
 
-if [ -L /root/home/$USERNAME/Examples ]
+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/
+       chroot /root install -o ${USERNAME} -g ${USERNAME} -d /home/${USERNAME}/Desktop/
+       mv /root/home/${USERNAME}/Examples /root/home/${USERNAME}/Desktop/
 fi
 
 if [ -f "/root/usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved" ]
 then
-       chroot /root install -D -o $USERNAME -g $USERNAME /usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved /home/$USERNAME/Desktop/about-kubuntu.desktop
+       chroot /root install -D -o ${USERNAME} -g ${USERNAME} /usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved /home/${USERNAME}/Desktop/about-kubuntu.desktop
 fi
 
 log_end_msg
index 73e18d4..3d036c9 100755 (executable)
@@ -33,7 +33,7 @@ log_begin_msg "Configuring fstab..."
 
 FSTAB=/root/etc/fstab
 
-cat >> $FSTAB << EOF
+cat >> ${FSTAB} << EOF
 ${UNIONTYPE} / ${UNIONTYPE} rw 0 0
 tmpfs /tmp tmpfs nosuid,nodev 0 0
 EOF
index 4980433..f3af1cc 100755 (executable)
@@ -36,25 +36,25 @@ devices=""
 
 for device in /dev/[hs]d[a-z][0-9]*
 do
-       if ! [ -b "$device" ]
+       if ! [ -b "${device}" ]
        then
                continue
        fi
 
-       magic=$(/bin/dd if="$device" bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue
+       magic=$(/bin/dd if="${device}" bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue
 
-       if [ "$magic" = "SWAPSPACE2" -o "$magic" = "SWAP-SPACE" ]
+       if [ "${magic}" = "SWAPSPACE2" -o "${magic}" = "SWAP-SPACE" ]
        then
-               #log "Found $device"
-               devices="$devices $device"
+               #log "Found ${device}"
+               devices="${devices} ${device}"
        fi
 done
 
-for device in $devices
+for device in ${devices}
 do
 
-cat >> $FSTAB << EOF
-$device swap swap defaults 0 0
+cat >> ${FSTAB} << EOF
+${device} swap swap defaults 0 0
 EOF
 
 done
index 40383cb..b0ce90d 100755 (executable)
@@ -51,9 +51,9 @@ then
        # Configure GDM autologin
        chroot /root \
        sed -i -e "s/^AutomaticLoginEnable=.*\$/AutomaticLoginEnable=true/" \
-              -e "s/^AutomaticLogin=.*\$/AutomaticLogin=$USERNAME/" \
+              -e "s/^AutomaticLogin=.*\$/AutomaticLogin=${USERNAME}/" \
               -e "s/^TimedLoginEnable=.*\$/TimedLoginEnable=true/" \
-              -e "s/^TimedLogin=.*\$/TimedLogin=$USERNAME/" \
+              -e "s/^TimedLogin=.*\$/TimedLogin=${USERNAME}/" \
               -e "s/^TimedLoginDelay=.*\$/TimedLoginDelay=10/" \
        ${GDMCONF}
 fi
@@ -62,7 +62,7 @@ if [ -f /root/etc/kde3/kdm/kdmrc ]
 then
        # Configure KDM autologin
        sed -i -r -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \
-                 -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \
+                 -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=${USERNAME}/" \
                  -e "s/^#?AutoReLogin=.*\$/AutoReLogin=true/" \
        /root/etc/kde3/kdm/kdmrc
 fi
index ac35389..1dbb897 100755 (executable)
@@ -31,11 +31,11 @@ log_begin_msg "Setting hostname..."
 
 # live-initramfs script
 
-echo "$HOSTNAME" > /root/etc/hostname
+echo "${HOSTNAME}" > /root/etc/hostname
 
 cat >> /root/etc/hosts << EOF
 127.0.0.1 localhost
-127.0.1.1 $HOSTNAME
+127.0.1.1 ${HOSTNAME}
 
 # The following lines are desirable for IPv6 capable hosts
 ::1     ip6-localhost ip6-loopback
index ef91c90..784aa05 100755 (executable)
@@ -63,22 +63,22 @@ fi
 
 if [ -x /root/bin/setupcon ] && [ -f /root/etc/default/console-setup ]
 then
-       if [ "$cslayout" ]
+       if [ "${cslayout}" ]
        then
-               chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"$cslayout\"/" \
+               chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"${cslayout}\"/" \
                /etc/default/console-setup
 
-               if [ "$csvariant" ]
+               if [ "${csvariant}" ]
                then
-                       chroot /root sed -i "s/^XKBVARIANT=.*/XKBVARIANT=\"$csvariant\"/" \
+                       chroot /root sed -i "s/^XKBVARIANT=.*/XKBVARIANT=\"${csvariant}\"/" \
                        /etc/default/console-setup
                else
                        live-preseed /root console-setup/variantcode '' false
                fi
 
-               if [ "$csmodel" ]
+               if [ "${csmodel}" ]
                then
-                       chroot /root sed -i "s/^XKBMODEL=.*/XKBMODEL=\"$csmodel\"/" \
+                       chroot /root sed -i "s/^XKBMODEL=.*/XKBMODEL=\"${csmodel}\"/" \
                        /etc/default/console-setup
                else
                        live-preseed /root console-setup/modelcode '' false
@@ -91,9 +91,9 @@ then
 
        sed -i 's/CONSOLE_SCREEN=$/CONSOLE_SCREEN=setupcon/; t END; b; : END; n; b END' /root/etc/init.d/usplash
 else
-       chroot /root /usr/sbin/install-keymap $kbd
-       live-preseed /root debian-installer/keymap "$kbd"
-       live-preseed /root kbd-chooser/method "$kbd"
+       chroot /root /usr/sbin/install-keymap ${kbd}
+       live-preseed /root debian-installer/keymap "${kbd}"
+       live-preseed /root kbd-chooser/method "${kbd}"
 fi
 
 log_end_msg
index 902335e..779a1c2 100755 (executable)
@@ -31,10 +31,15 @@ log_begin_msg "Configuring X..."
 
 # live-initramfs script
 
-if [ "$TERM_TYPE" = "serial" ]
+if [ "${TERM_TYPE}" = "serial" ]
 then
        # Don't bother trying to configure or start X on a serial console
-       rm -f /etc/rc?.d/S??[gxk]dm
+       rm -f /root/etc/rc?.d/S??[gkx]dm
+       exit 0
+fi
+
+if [ -n "${TEXTONLY}" ]
+then
        exit 0
 fi
 
index 8e071d3..8322c9c 100755 (executable)
@@ -41,9 +41,9 @@ fi
 
 panel_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-panel-data 2>/dev/null) || panel_version=""
 
-if [ -n "$panel_version" ]
+if [ -n "${panel_version}" ]
 then
-       chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
+       chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
 fi
 
 log_end_msg
index e161da6..0b70452 100755 (executable)
@@ -32,14 +32,16 @@ log_begin_msg "Configuring screensaver..."
 # live-initramfs script
 
 gnome_screensaver_version=$(chroot /root dpkg-query -W --showformat='${Version}' gnome-screensaver 2>/dev/null) || gnome_screensaver_version=""
-if [ -n "$gnome_screensaver_version" ]; then
-    # Support legacy gconf value
-    chroot /root sudo -u "$USERNAME" gconftool-2 -t bool -s /apps/gnome-screensaver/lock false
-    chroot /root sudo -u "$USERNAME" gconftool-2 -t bool -s /apps/gnome-screensaver/lock_enabled false
+
+if [ -n "${gnome_screensaver_version}" ]
+then
+       # Support legacy gconf value
+       chroot /root sudo -u "${USERNAME}" gconftool-2 -t bool -s /apps/gnome-screensaver/lock false
+       chroot /root sudo -u "${USERNAME}" gconftool-2 -t bool -s /apps/gnome-screensaver/lock_enabled false
 fi
 
 if [ -d /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config ]; then
-    printf "[ScreenSaver]\nLock=false\n" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/kdesktoprc
+       printf "[ScreenSaver]\nLock=false\n" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/kdesktoprc
 fi
 
 log_end_msg
index b73a107..4cc300a 100755 (executable)
@@ -27,7 +27,7 @@ log_begin_msg "Preconfiguring /etc/modules..."
 # live-initramfs script
 
 # load the right modules
-case "$DPKG_ARCH" in
+case "${DPKG_ARCH}" in
        powerpc|ppc64)
                echo snd_powermac >> /root/etc/modules
                ;;
index aeff351..603116f 100755 (executable)
@@ -33,14 +33,14 @@ log_begin_msg "Preconfiguring networking..."
 
 IFFILE="/root/etc/network/interfaces"
 
-if [ "${STATICIP}" = "frommedia" -a -e  "$IFFILE" ]
+if [ "${STATICIP}" = "frommedia" -a -e  "${IFFILE}" ]
 then
        # will use existent /etc/network/interfaces
        log_end_msg
        exit 0
 fi
 
-cat > "$IFFILE" << EOF
+cat > "${IFFILE}" << EOF
 auto lo
 iface lo inet loopback
 
@@ -60,7 +60,7 @@ then
                ifnetmask="$(echo ${ifline} | cut -f3 -d ',')"
                ifgateway="$(echo ${ifline} | cut -f4 -d ',')"
 
-cat >> "$IFFILE" << EOF
+cat >> "${IFFILE}" << EOF
 auto ${ifname}
 iface ${ifname} inet static
     address ${ifaddress}
@@ -82,16 +82,16 @@ else
        fi
 
        # iterate the physical interfaces and add them to the interfaces list
-       if [ "$method" != dhcp ] || [ ! -x /root/usr/sbin/NetworkManager ]
+       if [ "${method}" != dhcp ] || [ ! -x /root/usr/sbin/NetworkManager ]
        then
                for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan*
                do
-                       [ -e $interface ] || continue
-                       i="$(basename $interface)"
+                       [ -e ${interface} ] || continue
+                       i="$(basename ${interface})"
 
-cat >> "$IFFILE" << EOF
-auto $i
-iface $i inet $method
+cat >> "${IFFILE}" << EOF
+auto ${i}
+iface ${i} inet ${method}
 
 EOF
 
@@ -132,11 +132,11 @@ fi
 #then
 #      for i in eth0 eth1 eth2 ath0 wlan0
 #      do
-#              grep -q "iface $i" $IFFILE && continue
+#              grep -q "iface ${i}" ${IFFILE} && continue
 #
-#cat >> "$IFFILE" << EOF
-#auto $i
-#iface $i inet dhcp
+#cat >> "${IFFILE}" << EOF
+#auto ${i}
+#iface ${i} inet dhcp
 #
 #EOF
 #
index f4b2db0..a8f5a46 100755 (executable)
@@ -52,6 +52,17 @@ then
        done
 fi
 
+reply="$(echo "GET preseed/early_command" | chroot /root debconf-communicate -fnoninteractive live-initramfs)"
+
+if [ "${reply#0 }" != "${reply}" ]
+then
+       reply="${reply#0 }"
+       sh -c "${reply}"
+fi
+
+# Clear out debconf database backup files to save memory.
+rm -f /root/var/cache/debconf/*.dat-old
+
 log_end_msg
 
 exit 0
index e30261a..bec5608 100755 (executable)
@@ -30,7 +30,7 @@ log_begin_msg "Setting up init..."
 
 if [ -z "${NOAUTOLOGIN}" ]
 then
-       if [ -n "$USERNAME" ]
+       if [ -n "${USERNAME}" ]
        then
                if [ ! -z "${LIVE_GETTY}" ]
                then
@@ -47,9 +47,9 @@ then
                                then
                                        IDs="A B C D E F G H I J K L M N O P Q R S T Q U V V X Y Z 0 1 2 3 4 5 6 7 8 9"
 
-                                       for ID1 in $IDs
+                                       for ID1 in ${IDs}
                                        do
-                                               for ID2 in $IDs
+                                               for ID2 in ${IDs}
                                                do
                                                        ID="${ID1}${ID2}"
 
@@ -72,25 +72,28 @@ then
                else
                        if [ -f /root/etc/inittab ]
                        then
-                               sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f $USERNAME </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab
+                               sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f ${USERNAME} </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab
                        fi
 
                        if [ "/root/etc/event.d/tty*" != "$(echo /root/etc/event.d/tty*)" ]
                        then
                                for f in /root/etc/event.d/tty*
                                do
-                                       sed -i -e "s|^respawn.*|respawn /bin/login -f $USERNAME </dev/$(basename $f) > /dev/$(basename $f) 2>\&1|" $f
+                                       sed -i -e "s|^respawn.*|respawn /bin/login -f ${USERNAME} </dev/$(basename ${f}) > /dev/$(basename ${f}) 2>\&1|" ${f}
                                done
 
                                if [ "${BUILD_SYSTEM}" = "Ubuntu" ]
                                then
                                        for x in $(cat /proc/cmdline)
                                        do
-                                               case $x in
+                                               case ${x} in
                                                        noninteractive)
                                                                sed -i -e "s|^exec.*|exec /usr/bin/ubiquity noninteractive </dev/tty1 > /dev/tty1 2>\&1|" /root/etc/event.d/tty1
-                                                               rm -f /root/etc/rc?.d/[SK]??gdm
-                                                               rm -f /root/etc/rc?.d/[SK]??kdm
+                                                               rm -f /root/etc/rc?.d/[SK]??[gkx]dm
+                                                               ;;
+
+                                                       textonly)
+                                                               rm -f /root/etc/rc?.d/[SK]??[gkx]dm
                                                                ;;
                                                esac
                                        done
index 17defbf..4726a75 100755 (executable)
@@ -35,9 +35,9 @@ gconf_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gc
 
 gct ()
 {
-       if [ "$gconf_version" ]
+       if [ "${gconf_version}" ]
        then
-               chroot /root sudo -u "$USERNAME" gconftool-2 "$@"
+               chroot /root sudo -u "${USERNAME}" gconftool-2 "${@}"
        fi
 }
 
index 0965c73..f77c668 100755 (executable)
@@ -33,16 +33,17 @@ log_begin_msg "Configuring power management..."
 
 gpm_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-power-manager 2>/dev/null) || panel_version=""
 
-if [ -n "$gpm_version" ]
+if [ -n "${gpm_version}" ]
 then
        #live-reconfigure /root gnome-power-manager
-       chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/can_hibernate false
-       chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/can_suspend false
+       # Gnome < 2.20
+       chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/gnome-power-manager/can_hibernate false
+       # Gnome >= 2.20
+       chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/gnome-power-manager/general/can_hibernate false
 fi
 
 if [ -d /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config ]
 then
-       echo "disableSuspend=1" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/power-managerrc
        echo "disableHibernate=1" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/power-managerrc
 fi
 
index 747ba26..f300652 100755 (executable)
@@ -33,9 +33,9 @@ log_begin_msg "Enabling notifications about program crashes..."
 
 update_notifier_version=$(chroot /root dpkg-query -W --showformat='${Version}' update-notifier 2>/dev/null) || update_notifier_version=""
 
-if [ -n "$update_notifier_version" ]
+if [ -n "${update_notifier_version}" ]
 then
-       chroot /root sudo -u "$USERNAME" gconftool-2 -t bool -s /apps/update-notifier/show_apport_crashes true
+       chroot /root sudo -u "${USERNAME}" gconftool-2 -t bool -s /apps/update-notifier/show_apport_crashes true
 fi
 
 log_end_msg
diff --git a/scripts/live-bottom/36disable_trackerd b/scripts/live-bottom/36disable_trackerd
new file mode 100755 (executable)
index 0000000..24a43d8
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+#set -e
+
+# initramfs-tools header
+
+PREREQ=""
+
+prereqs()
+{
+       echo "${PREREQ}"
+}
+
+case "${1}" in
+       prereqs)
+               prereqs
+               exit 0
+               ;;
+esac
+
+# live-initramfs header
+
+if [ -n "${NOTIMEZONE}" ]
+then
+       exit 0
+fi
+
+. /scripts/live-functions
+
+log_begin_msg "Disabling trackerd..."
+
+# live-initramfs script
+
+rm -f /root/etc/xdg/autostart/trackerd.desktop \
+      /root/usr/share/autostart/trackerd.desktop
+
+log_end_msg
index 762a084..584dcd0 100755 (executable)
@@ -33,18 +33,18 @@ log_begin_msg "Installing driver updates..."
 
 install_dir=/var/cache/driver-updates
 
-mkdir "/root$install_dir"
-cp -a /tmp/driver-updates/*.deb "/root$install_dir/"
+mkdir "/root${install_dir}"
+cp -a /tmp/driver-updates/*.deb "/root${install_dir}/"
 
 # We cannot leave packages in a bad state. So if the install fails, remove
 # it. This will get caught in live.log.
-for deb in "/root$install_dir"/*
+for deb in "/root${install_dir}"/*
 do
-       [ -f "$deb" ] || continue
+       [ -f "${deb}" ] || continue
 
        debbase="${deb##*/}"
 
-       if ! chroot /root dpkg -i "$install_dir/$debbase"
+       if ! chroot /root dpkg -i "${install_dir}/${debbase}"
        then
                chroot /root dpkg -P "${debbase%%_*}"
        fi
index baa920c..6fb57c6 100644 (file)
@@ -19,11 +19,11 @@ log_wait_msg ()
        # Print a message and wait for enter
        if [ -x /sbin/usplash_write ]
        then
-               /sbin/usplash_write "INPUTENTER $@"
+               /sbin/usplash_write "INPUTENTER ${@}"
                read nunya < /dev/.initramfs/usplash_outfifo
        fi
 
-       _log_msg "Waiting: $@ ..."
+       _log_msg "Waiting: ${@} ..."
 }
 
 really_export ()
index 9cf3b99..e74108c 100644 (file)
@@ -25,7 +25,7 @@ sys2dev ()
 
 subdevices ()
 {
-       sysblock=$1
+       sysblock=${1}
        r=""
 
        for dev in "${sysblock}" "${sysblock}"/*
@@ -44,25 +44,25 @@ get_fstype ()
        local FSTYPE
        local FSSIZE
 
-       eval $(fstype < $1)
+       eval $(fstype < ${1})
 
-       if [ "$FSTYPE" != "unknown" ]
+       if [ "${FSTYPE}" != "unknown" ]
        then
-               echo $FSTYPE
+               echo ${FSTYPE}
                return 0
        fi
 
-       /lib/udev/vol_id -t $1 2>/dev/null
+       /lib/udev/vol_id -t ${1} 2>/dev/null
 }
 
 where_is_mounted ()
 {
-       device=$1
+       device=${1}
 
-       if grep -q "^$device " /proc/mounts
+       if grep -q "^${device} " /proc/mounts
        then
-               grep "^$device " /proc/mounts | read d mountpoint rest
-               echo $mountpoint
+               grep "^${device} " /proc/mounts | read d mountpoint rest
+               echo ${mountpoint}
                return 0
        fi
 
@@ -89,11 +89,11 @@ base_path ()
        do
                if echo "${mounts}" | grep -qs "^${testpath}"
                then
-                       set -- `echo "${mounts}" | grep "^${testpath}" | lastline`
+                       set -- $(echo "${mounts}" | grep "^${testpath}" | lastline)
                        echo ${1}
                        break
                else
-                       testpath=`dirname $testpath`
+                       testpath=$(dirname $testpath)
                fi
        done
 }
@@ -101,7 +101,7 @@ base_path ()
 fs_size ()
 {
        # Returns used/free fs kbytes + 5% more
-       # You could pass a block device as $1 or the mount point as $2
+       # You could pass a block device as ${1} or the mount point as ${2}
 
        dev="${1}"
        mountp="${2}"
@@ -111,7 +111,7 @@ fs_size ()
        then
                mountp=$(where_is_mounted "${dev}")
 
-               if [ "$?" -gt 0 ]
+               if [ "${?}" -gt 0 ]
                then
                        mountp="/mnt/tmp_fs_size"
 
@@ -151,18 +151,18 @@ load_keymap ()
 
 setup_loop ()
 {
-       local fspath=$1
-       local module=$2
-       local pattern=$3
-       local offset=$4
-       local encryption=$5
+       local fspath=${1}
+       local module=${2}
+       local pattern=${3}
+       local offset=${4}
+       local encryption=${5}
 
-       modprobe ${MP_QUIET} -b "$module"
+       modprobe ${MP_QUIET} -b "${module}"
        udevsettle
 
-       for loopdev in $pattern
+       for loopdev in ${pattern}
        do
-               if [ "$(cat $loopdev/size)" -eq 0 ]
+               if [ "$(cat ${loopdev}/size)" -eq 0 ]
                then
                        dev=$(sys2dev "${loopdev}")
                        options=''
@@ -186,7 +186,7 @@ setup_loop ()
                                        echo "${passphrase}" > /tmp/passphrase
                                        exec 9</tmp/passphrase
                                        /sbin/losetup ${options} -e "${encryption}" -p 9 "${dev}" "${fspath}"
-                                       error=$?
+                                       error=${?}
                                        exec 9<&-
                                        rm -f /tmp/passphrase
 
@@ -207,7 +207,7 @@ setup_loop ()
                                done
                        fi
 
-                       echo "$dev"
+                       echo "${dev}"
                        return 0
                fi
        done
@@ -241,9 +241,9 @@ find_cow_device ()
                do
                        devname=$(sys2dev "${dev}")
 
-                       if [ "$(/lib/udev/vol_id -l $devname 2>/dev/null)" = "${pers_label}" ]
+                       if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${pers_label}" ]
                        then
-                               echo "$devname"
+                               echo "${devname}"
                                return
                        elif [ "$(get_fstype ${devname})" = "vfat" ]
                        then
@@ -265,7 +265,7 @@ find_cow_device ()
 
 find_files ()
 {
-       # return the first of $filenames found on vfat and ext2/ext3 devices
+       # return the first of ${filenames} found on vfat and ext2/ext3 devices
        # FIXME: merge with above function
 
        filenames="${1}"
index 0a88724..22d64d2 100755 (executable)
@@ -40,16 +40,16 @@ is_updates_path ()
        # subdirectory. Each package contains a module for a specific
        # kernel flavour.
 
-       path=$1
+       path=${1}
        kbase=$(uname -r | sed 's/^\([0-9]*\.[0-9]*\.[0-9]*\)-.*/\1/')
-       update_dir="$path/ubuntu-drivers/$kbase"
+       update_dir="${path}/ubuntu-drivers/${kbase}"
 
-       if [ -d "$update_dir" ]
+       if [ -d "${update_dir}" ]
        then
-               if [ "$(echo $update_dir/*_$DPKG_ARCH.deb)" != \
-                       "$update_dir/*_$DPKG_ARCH.deb" ]
+               if [ "$(echo ${update_dir}/*_${DPKG_ARCH}.deb)" != \
+                       "${update_dir}/*_${DPKG_ARCH}.deb" ]
                then
-                       echo "$update_dir"
+                       echo "${update_dir}"
                        return 0;
                fi
        fi
@@ -99,11 +99,11 @@ check_dev_updates ()
        then
                mount -t ${fstype} -o ro "${devname}" $mountpoint || continue
 
-               if is_updates_path $mountpoint
+               if is_updates_path ${mountpoint}
                then
                        return 0
                else
-                       umount $mountpoint
+                       umount ${mountpoint}
                fi
        fi
 
@@ -150,14 +150,14 @@ updates="false"
 
 for x in $(cat /proc/cmdline)
 do
-       case $x in
+       case ${x} in
                debian-installer/driver-update=*)
                        updates=${x#debian-installer/driver-update=}
                        ;;
        esac
 done
 
-if [ "$updates" != "true" ]
+if [ "${updates}" != "true" ]
 then
        log_end_msg
        exit 0
@@ -183,7 +183,7 @@ then
        eject
 fi
 
-log_wait_msg "Insert a driver CD and press ENTER ($DPKG_ARCH)"
+log_wait_msg "Insert a driver CD and press ENTER (${DPKG_ARCH})"
 
 log_begin_msg "Looking for driver update CD"
 
@@ -211,8 +211,8 @@ fi
 log_begin_msg "Copying driver updates to temporary location"
 
 mkdir -p /tmp/driver-updates
-cp $updates_root/*_$DPKG_ARCH.deb /tmp/driver-updates/
-umount $mountpoint
+cp ${updates_root}/*_${DPKG_ARCH}.deb /tmp/driver-updates/
+umount ${mountpoint}
 
 if [ -x /usr/bin/eject ]
 then