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
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
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
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
# 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
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."
;;
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
;;
Is_same_mount ()
{
- dir1="`Base_path $1`"
- dir2="`Base_path $2`"
+ dir1="$(Base_path ${1})"
+ dir2="$(Base_path ${2})"
if [ "${dir1}" = "${dir2}" ]
then
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
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
;;
Mount_device ()
{
- dev="$1"
+ dev="${1}"
if [ ! -d "${MOUNTP}" ]
then
# 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}" ]
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
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}"
Main ()
{
- Parse_args "$@"
+ Parse_args "${@}"
Defaults
Do_snapshot
Clean
}
-Main "$@"
+Main "${@}"
+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
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:
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
{
PRESEEDS=""
- for ARGUMENT in `cat /proc/cmdline`
+ for ARGUMENT in $(cat /proc/cmdline)
do
case "${ARGUMENT}" in
access=*)
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}")"
;;
*/*=*)
export SHOWMOUNTS
;;
+ textonly)
+ TEXTONLY="Yes"
+ export TEXTONLY
+ ;;
+
timezone=*)
TIMEZONE="${ARGUMENT#timezone=}"
export TIMEZONE
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
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)
;;
*)
- 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
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
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
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
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})"
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" ]
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
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}
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
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}"
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
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}"
setup_unionfs ()
{
- image_directory="$1"
- rootmnt="$2"
+ image_directory="${1}"
+ rootmnt="${2}"
modprobe "${MP_QUIET}" -b ${UNIONTYPE}
# 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
# 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
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})"
rofslist="${image} ${rofslist}"
elif [ -f "${image}" ]
then
- backdev=$(get_backing_device "$image")
+ backdev=$(get_backing_device "${image}")
fstype=$(get_fstype "${backdev}")
if [ "${fstype}" = "unknown" ]
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
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}" ]
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
# 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 ()
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
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
# 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
if [ -n "${MODULETORAMFILE}" ]
then
- setup_unionfs "${livefs_root}" "$rootmnt"
+ setup_unionfs "${livefs_root}" "${rootmnt}"
else
mount_images_in_directory "${livefs_root}" "${rootmnt}"
fi
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>&-
# 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
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
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
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
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
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
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
FSTAB=/root/etc/fstab
-cat >> $FSTAB << EOF
+cat >> ${FSTAB} << EOF
${UNIONTYPE} / ${UNIONTYPE} rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
EOF
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
# 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
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
# 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
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
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
# 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
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
# 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
# live-initramfs script
# load the right modules
-case "$DPKG_ARCH" in
+case "${DPKG_ARCH}" in
powerpc|ppc64)
echo snd_powermac >> /root/etc/modules
;;
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
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}
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
#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
#
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
if [ -z "${NOAUTOLOGIN}" ]
then
- if [ -n "$USERNAME" ]
+ if [ -n "${USERNAME}" ]
then
if [ ! -z "${LIVE_GETTY}" ]
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}"
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
gct ()
{
- if [ "$gconf_version" ]
+ if [ "${gconf_version}" ]
then
- chroot /root sudo -u "$USERNAME" gconftool-2 "$@"
+ chroot /root sudo -u "${USERNAME}" gconftool-2 "${@}"
fi
}
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
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
--- /dev/null
+#!/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
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
# 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 ()
subdevices ()
{
- sysblock=$1
+ sysblock=${1}
r=""
for dev in "${sysblock}" "${sysblock}"/*
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
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
}
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}"
then
mountp=$(where_is_mounted "${dev}")
- if [ "$?" -gt 0 ]
+ if [ "${?}" -gt 0 ]
then
mountp="/mnt/tmp_fs_size"
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=''
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
done
fi
- echo "$dev"
+ echo "${dev}"
return 0
fi
done
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
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}"
# 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
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
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
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"
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