update:
set -e; for MANPAGE in manpages/*.en.*; \
do \
- sed -i -e 's/2007\\-05\\-07/2007\\-05\\-14/' \
- -e 's/1.87.2/1.87.3/' \
+ sed -i -e 's/2007\\-05\\-14/2007\\-05\\-21/' \
+ -e 's/1.87.3/1.87.4/' \
$$MANPAGE; \
done
echo " -d, --device: specifies the output snapshot device (default: none)."
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\" or \"cpio\".gz archive (default: cpio)"
+ 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."
exit 0
}
cpio)
( cd "${COW}" && find . -path '*.wh.*' -prune -o -print0 | cpio --quiet -o0 -H newc | gzip -9c > "${DEST}" ) || exit 1
;;
- ext2)
+ 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...
genext2fs --size-in-blocks=${REAL_DIM} --reserved-blocks=0 --root="${COW}" "${DEST}" || exit 1
TYPE="squashfs" ;;
"")
TYPE="ext2" ;;
- *.ext2)
+ *.ext2|*.ext3)
TYPE="ext2" ;;
*)
Usage "Unregognized String" ;;
fi
case "${SNAP_TYPE}" in
- "cpio"|"squashfs"|"ext2")
+ "cpio"|"squashfs"|"ext2"|"ext3")
TYPE="${SNAP_TYPE}"
;;
"")
+live-initramfs (1.87.4-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Daniel Baumann <daniel@debian.org> Mon, 21 May 2007 00:00:00 +0200
+
live-initramfs (1.87.3-1) unstable; urgency=medium
* New upstream release.
dh_compress
dh_fixperms
dh_installdeb
+ dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
+2007-06-18 Daniel Baumann <daniel@debian.org>
+
+ * scripts/live, scripts/live-bottom/05mountpoints:
+ - Replaced 'mount -o move' with 'mount --move'.
+ * scripts/live, scripts/live-bottom/10adduser:
+ - Added check for 'nosudo' bootparameter to disable automatic
+ sudo configuration.
+ * scripts/live, scripts/live-bottom/13swap:
+ - Renamed 'swapoff' parameter to 'noswap'.
+ * scripts/live, scripts/live-bottom/15autologin:
+ - Added check for 'noxautologin' bootparameter to disable automatic
+ gdm/kdm login.
+ * scripts/live, scripts/live-bottom/25configure_init:
+ - Added check for 'noautologin' bootparameter to disable automatic
+ terminal login.
+ * bin/live-snapshot, scripts/live, scripts/live-helpers:
+ - Also recognize ext3, but treat it like ext2.
+
+2007-06-12 Daniel Baumann <daniel@debian.org>
+
+ * scripts/live-bottom/*:
+ - Added generic header.
+
2007-05-12 Daniel Baumann <daniel@debian.org>
* scripts/live:
-.TH LIVE\-INITRAMFS 7 "2007\-05\-14" "1.81.3" "live\-initramfs"
+.TH LIVE\-INITRAMFS 7 "2007\-05\-21" "1.87.4" "live\-initramfs"
.SH NAME
live\-initramfs \- Debian Live initramfs generator
Instead of using the default optional file "order.lst" (see below) another file could be specified without the extension ".lst"; it should be placed on "/live" directory of the live medium.
.IP "\fBnetboot\fR[=nfs|cifs]" 4
This tells live\-initramfs to perform a network mount. The parameter "nfsroot=" (with optional "nfsopts="), should specify where is the location of the root filesystem. With no args, will try cifs first, and if it fails nfs.
+.IP "\fBnoautologin\fR" 4
+This parameter disables the automatic terminal login only, not touching gdk/kdm.
+.IP "\fBnoxautologin\fR" 4
+This parameter disables the automatic login of gdm/kdm only, not touching terminals.
+.IP "\fBnopersistent\fR" 4
+disables the "persistent" feature, useful if the bootloader (like syslinux) has been installed with persistent enabled.
+.IP "\fBnosudo\fR" 4
+This parameter disables the automatic configuration of sudo.
+.IP "\fBnoswap\fR" 4
+This parameter disables usage of local swap partitions.
.IP "\fBpersistent\fR" 4
live\-initramfs will look for persistent and snapshot partitions or files labeled "live\-rw", "home\-rw", and files called "live\-sn*", "home\-sn*" and will try to, in order: mount as /cow the first, mount the second in /home, and just copy the contents of the latter in appropriate locations (snapshots). Snapshots will be tried to be updated on reboot/shutdown. Look at \fIlive\-snapshot\fR(1) for more informations.
-.IP "\fBnopersistent\fR" 4
-disables the above mentioned "persistent" feature, useful if the bootloader (like syslinux) has been installed with persistent enabled.
.IP "\fBquickreboot\fR" 4
This option causes live\-initramfs to reboot without attempting to eject the media and without asking the user to remove the boot media.
.IP "\fBshowmounts\fR" 4
This parameter will make live\-initramfs to show on "/" the ro filesystems (mostly compressed) on "/live". This is not enabled by default because could lead to problems by applications like "mono" which store binary paths on installation.
-.IP "\fBswapoff\fR" 4
-This parameter disables usage of local swap partitions.
.IP "\fBtodisk=\fR\fIDEVICE" 4
Adding this parameter, live\-initramfs will try to copy the entire read\-only media to the specified device before mounting the root filesystem. It probably needs a lot of free space. Subsequent boots should then skip this step and just specify the "live\-media=DEVICE" boot parameter with the same DEVICE used this time.
.IP "\fBtoram\fR" 4
-.TH LIVE\-SNAPSHOT 1 "2007\-05\-14" "1.81.3" "live\-initramfs"
+.TH LIVE\-SNAPSHOT 1 "2007\-05\-21" "1.87.4" "live\-initramfs"
.SH NAME
live\-snapshot \- a simple script to ease persistence usage
export TORAM="Yes" ;;
todisk=*)
export TODISK=${x#todisk=} ;;
- swapoff)
- export SWAPOFF="Yes" ;;
+ noswap)
+ export NOSWAP="Yes" ;;
+ noautologin)
+ export NOAUTOLOGIN="Yes" ;;
+ noxautologin)
+ export NOXAUTOLOGIN="Yes" ;;
+ nosudo)
+ export NOSUDO="Yes" ;;
showmounts)
export SHOWMOUNTS="Yes" ;;
persistent)
if [ -d "$path/live" ]; then
if [ "$(echo $path/live/*.squashfs)" != "$path/live/*.squashfs" ] ||
[ "$(echo $path/live/*.ext2)" != "$path/live/*.ext2" ] ||
+ [ "$(echo $path/live/*.ext3)" != "$path/live/*.ext3" ] ||
[ "$(echo $path/live/*.dir)" != "$path/live/*.dir" ]; then
return 0
fi
get_backing_device() {
case "$1" in
- *.squashfs|*.ext2)
+ *.squashfs|*.ext2|*.ext3)
echo $(setup_loop "$1" "loop" "/sys/block/loop*" '0' "${LIVE_MEDIA_ENCRYPTION}")
;;
*.dir)
rootmnt="$2"
if match_files_in_dir "$directory/live/*.squashfs" ||
match_files_in_dir "$directory/live/*.ext2" ||
+ match_files_in_dir "$directory/live/*.ext3" ||
match_files_in_dir "$directory/live/*.dir"; then
setup_unionfs "$directory/live" "$rootmnt"
else
mount -t "${fstype}" ${mount_options} "${dev}" "${copyto}"
cp -a ${copyfrom}/* ${copyto} # "cp -a" from busybox also copies hidden files
umount ${copyfrom}
- mount -r -o move ${copyto} ${copyfrom}
+ mount -r --move ${copyto} ${copyfrom}
rmdir ${copyto}
return 0
}
snap_mount="${2}"
snap_type="${3}"
- snapdata=$(find_files "${snap_label}.squashfs ${snap_label}.cpio.gz ${snap_label}.ext2")
+ snapdata=$(find_files "${snap_label}.squashfs ${snap_label}.cpio.gz ${snap_label}.ext2 ${snap_label}.ext3")
if [ ! -z "${snapdata}" ]; then
snapdev="$(echo ${snapdata} | cut -f1 -d ' ')"
snapback="$(echo ${snapdata} | cut -f2 -d ' ')"
snapfile="$(echo ${snapdata} | cut -f3 -d ' ')"
- if echo "${snapfile}" | grep -qs '\(squashfs\|ext2\)'; then
- # squashfs or ext2 snapshot
+ if echo "${snapfile}" | grep -qs '\(squashfs\|ext2\|ext3\)'; then
+ # squashfs or ext2/ext3 snapshot
dev=$(get_backing_device "${snapback}/${snapfile}")
if ! do_snap_copy "${dev}" "${snap_mount}" "${snap_type}"; then
log_warning_msg "Impossible to include the ${snapfile} Snapshot"
done
else
# If ${MODULE}.lst does not exist, create a list of images
- for image_type in "ext2" "squashfs" "dir"; do
+ for image_type in "ext2" "ext3" "squashfs" "dir"; do
for image in "${image_directory}"/*."${image_type}"; do
if [ -e "${image}" ]; then
image_string="${image_string} ${image}";
case d in
*.dir) # do nothing # mount -o bind "${d}" "${rootmnt}/live/${d##*/}"
;;
- *) mount -o move "${d}" "${rootmnt}/live/${d##*/}"
+ *) mount --move "${d}" "${rootmnt}/live/${d##*/}"
;;
esac
done
fi
done
elif [ "${fstype}" = "squashfs" -o \
- "${fstype}" = "ext3" -o \
- "${fstype}" = "ext2" ]; then
+ "${fstype}" = "ext2" -o \
+ "${fstype}" = "ext3" ]; then
# This is an ugly hack situation, the block device has
# an image directly on it. It's hopefully
# live-initramfs, so take it and run with it.
#!/bin/sh
+#set -e
+
+# initramfs-tools header
+
PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
+# live-initramfs script
+
grep integrity-check /proc/cmdline && live-md5check /live_media /live_media/md5sum.txt < /dev/tty8
-#! /bin/sh
+#!/bin/sh
-PREREQ=""
-DESCRIPTION="Setting timezone..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Setting timezone..."
+
+# live-initramfs script
+
cp -f /root/usr/share/zoneinfo/UTC /root/etc/localtime
+
+log_end_msg
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Copying config on real root fs..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Copying config on real root fs..."
+
+# live-initramfs script
if [ -f /etc/live.conf ] ; then
if [ ! -z "${LIVECONF}" ]; then
EOF
fi
+
+log_end_msg
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Moving mount points..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Moving mount points..."
+
+# live-initramfs script
# Move to the new root filesystem so that programs there can get at it.
if [ ! -d /root/live_media ]; then
mkdir -p /root/live_media
- mount -n -o move /live_media /root/live_media
+ mount -n --move /live_media /root/live_media
fi
log_end_msg
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Adding live session user..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Adding live session user..."
+
+# live-initramfs script
if [ "${BUILD_SYSTEM}" == "Debian" ]; then
user_crypted="8Ab05sVQ4LLps" # as in `echo "live" | mkpasswd -s`
set passwd/user-uid
EOF
+if [ -z "${NOSUDO}" ]
+then
+
if [ -f /root/etc/sudoers ]; then
if [ "${BUILD_SYSTEM}" == "Ubuntu" ]; then
grep -q '^%admin' /root/etc/sudoers && sed -i -e '/^%admin/s/ALL$/NOPASSWD: ALL/' /root/etc/sudoers || echo '%admin ALL=(ALL) NOPASSWD: ALL' >> /root/etc/sudoers
fi
fi
+fi
+
if [ -L /root/home/$USERNAME/Examples ]; then
chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/
mv /root/home/$USERNAME/Examples /root/home/$USERNAME/Desktop/
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Configuring fstab..."
-FSTAB=/root/etc/fstab
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Configuring fstab..."
+
+# live-initramfs script
+
+FSTAB=/root/etc/fstab
cat > $FSTAB <<EOF
unionfs / unionfs rw 0 0
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Setting up swap..."
-FSTAB=/root/etc/fstab
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Setting up swap..."
+
+# live-initramfs script
+
+FSTAB=/root/etc/fstab
-if [ -n "${SWAPOFF}" ]
+if [ -n "${NOSWAP}" ]
then
exit 0
fi
-#! /bin/sh
+#!/bin/sh
-PREREQ=""
-DESCRIPTION="Setting up locales..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Setting up locales..."
+
+# live-initramfs script
if [ -e /root/etc/default/locale ]; then
grep_file=/root/etc/default/locale
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Setting up automatic login..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Setting up automatic login..."
+
+# live-initramfs script
+
+if [ -z "${NOXAUTOLOGIN}" ]
+then
if chroot /root [ -f /etc/gdm/gdm-cdd.conf ]; then
GDMCONF=/etc/gdm/gdm-cdd.conf
/root/etc/kde3/kdm/kdmrc
fi
+fi
+
if chroot /root /usr/bin/which kpersonalizer >/dev/null; then
# Disable first-login wizard for KDE
if [ ! -f /root/etc/kde3/kpersonalizerrc ]; then
-#! /bin/sh
+#!/bin/sh
-PREREQ=""
-DESCRIPTION="Setting hostname..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Setting hostname..."
+
+# live-initramfs script
echo "$HOSTNAME" > /root/etc/hostname
cat > /root/etc/hosts <<EOF
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Setting up console keyboard..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Setting up console keyboard..."
+
+# live-initramfs script
kbd=
cslayout=
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Configuring X..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Configuring X..."
+
+# live-initramfs script
if [ "$TERM_TYPE" = "serial" ]; then
# Don't bother trying to configure or start X on a serial console
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Configuring X kludges..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Configuring X kludges..."
+
+# live-initramfs script
if [ -n "$XVIDEOMODE" ]
then
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Configuring gnome-panel-data..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+
+log_begin_msg "Configuring gnome-panel-data..."
+
+# live-initramfs script
if [ -x /root/usr/sbin/laptop-detect ]; then
if chroot /root laptop-detect; then
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Configuring screensaver..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+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
-#! /bin/sh
+#!/bin/sh
-PREREQ=""
-DESCRIPTION="Preconfiguring /etc/modules..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Preconfiguring /etc/modules..."
+
+# live-initramfs script
case "$DPKG_ARCH" in
# load the right modules
-#! /bin/sh
+#!/bin/sh
-PREREQ=""
-DESCRIPTION="Preconfiguring networking..."
-IFFILE="/root/etc/network/interfaces"
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Preconfiguring networking..."
+
+# live-initramfs script
+
+IFFILE="/root/etc/network/interfaces"
if [ "${STATICIP}" = "frommedia" -a -e "$IFFILE" ] ; then
# will use existent /etc/network/interfaces
-#! /bin/sh
+#!/bin/sh
-PREREQ=""
-DESCRIPTION="Loading preseed file..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
-prereqs ()
+prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Loading preseed file..."
+
+# live-initramfs script
if [ -f "/root/${LOCATION}" ]; then
chroot /root debconf-set-selections < "/root/${LOCATION}"
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Setting up init..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Setting up init..."
+
+# live-initramfs script
# Arrange for shells on virtual consoles, rather than login prompts
+if [ -z "${NOAUTOLOGIN}" ]
+then
+
if [ -n "$USERNAME" ]; then
if [ ! -z "${LIVE_GETTY}" ]; then
if echo "${DEFCONSOLE}" | grep -qs ttyS; then
fi
fi
+fi
+
# This has the nice side effect of the cron.{daily,weekly,monthly} jobs in
# /etc/crontab remaining disabled, yet also not run by anacron
if [ -x /root/etc/init.d/anacron ]; then
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Configuring accessibility options..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Configuring accessibility options..."
+
+# live-initramfs script
gconf_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gconf2 2>/dev/null) || gconf_version=""
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Disabling update-notifier..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Disabling update-notifier..."
+
+# live-initramfs script
# For GNOME, we divert away apt-check to avoid a regular 'apt-get update'
# equivalent in the live session. We want to run update-notifier for crash
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Configuring power management..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Configuring power management..."
+# live-initramfs script
gpm_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-power-manager 2>/dev/null) || panel_version=""
if [ -n "$gpm_version" ]; then
#!/bin/sh
-PREREQ=""
-DESCRIPTION="Enabling notifications about program crashes..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Enabling notifications about program crashes..."
+
+# live-initramfs script
update_notifier_version=$(chroot /root dpkg-query -W --showformat='${Version}' update-notifier 2>/dev/null) || update_notifier_version=""
if [ -n "$update_notifier_version" ]; then
-#! /bin/sh
+#!/bin/sh
-PREREQ=""
-DESCRIPTION="Disabling kwallet..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Disabling kwallet..."
+
+# live-initramfs script
rm -f /root/usr/share/services/kded/kwalletd.desktop
-#! /bin/sh
+#!/bin/sh
-PREREQ=""
-DESCRIPTION="Fixing language selector..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Fixing language selector..."
+
+# live-initramfs script
if [ -e /root/usr/share/applications/language-selector.desktop ]; then
sed -i '/^Exec/ s|/usr/bin/gnome-language-selector|"& -n"|' /root/usr/share/applications/language-selector.desktop
-#! /bin/sh
+#!/bin/sh
-PREREQ=""
-DESCRIPTION="Installing driver updates..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Installing driver updates..."
+
+# live-initramfs script
+
if [ ! -d /tmp/driver-updates ]; then
exit 0
fi
-log_begin_msg "$DESCRIPTION"
-
install_dir=/var/cache/driver-updates
mkdir "/root$install_dir"
-#! /bin/sh
+#!/bin/sh
-PREREQ=""
-DESCRIPTION="Adding APT-CDROM source..."
+#set -e
-. /scripts/live-functions
+# initramfs-tools header
+
+PREREQ=""
prereqs()
{
- echo "$PREREQ"
+ echo "${PREREQ}"
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
+# live-initramfs header
+
+. /scripts/live-functions
+
+log_begin_msg "Adding APT-CDROM source..."
+
+# live-initramfs script
+
mkdir -p /root/cdrom
mount -n -o bind /cdrom /root/cdrom
chroot /root apt-cdrom -m add
umount /root/cdrom
+
+log_end_msg
}
find_files()
-# return the first of $filenames found on vfat and ext2 devices
+# return the first of $filenames found on vfat and ext2/ext3 devices
# FIXME: merge with above function
{
filenames="${1}"
for dev in $(subdevices "${sysblock}"); do
devname=$(sys2dev "${dev}")
devfstype="$(get_fstype ${devname})"
- if [ "${devfstype}" = "vfat" ] || [ "${devfstype}" = "ext2" ] ; then # FIXME: all supported block devices should be scanned
+ if [ "${devfstype}" = "vfat" ] || [ "${devfstype}" = "ext2" ] || [ "${devfstype}" = "ext3" ]; then # FIXME: all supported block devices should be scanned
mkdir -p "${snap_backing}"
try_mount "${devname}" "${snap_backing}" "ro"
for filename in ${filenames}; do