From: Daniel Baumann Date: Sun, 23 Sep 2007 12:46:37 +0000 (+0200) Subject: Adding live-initramfs 1.87.4-1. X-Git-Tag: debian/2.0.15-1~725 X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=commitdiff_plain;h=ccea277caf476cdfef4c0f953df5a97062d8be42 Adding live-initramfs 1.87.4-1. --- diff --git a/Makefile b/Makefile index 9bf8496..7161b43 100644 --- a/Makefile +++ b/Makefile @@ -117,8 +117,8 @@ uninstall: 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 diff --git a/bin/live-snapshot b/bin/live-snapshot index b803b15..0c24f00 100755 --- a/bin/live-snapshot +++ b/bin/live-snapshot @@ -94,7 +94,7 @@ Help () 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 } @@ -138,7 +138,7 @@ Do_snapshot () 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 @@ -242,7 +242,7 @@ Defaults () TYPE="squashfs" ;; "") TYPE="ext2" ;; - *.ext2) + *.ext2|*.ext3) TYPE="ext2" ;; *) Usage "Unregognized String" ;; @@ -257,7 +257,7 @@ Defaults () fi case "${SNAP_TYPE}" in - "cpio"|"squashfs"|"ext2") + "cpio"|"squashfs"|"ext2"|"ext3") TYPE="${SNAP_TYPE}" ;; "") diff --git a/debian/changelog b/debian/changelog index 55305fe..5e81645 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +live-initramfs (1.87.4-1) unstable; urgency=medium + + * New upstream release. + + -- Daniel Baumann Mon, 21 May 2007 00:00:00 +0200 + live-initramfs (1.87.3-1) unstable; urgency=medium * New upstream release. diff --git a/debian/rules b/debian/rules index b827a8f..cde5630 100755 --- a/debian/rules +++ b/debian/rules @@ -62,6 +62,7 @@ binary-arch: build install dh_compress dh_fixperms dh_installdeb + dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb diff --git a/docs/ChangeLog b/docs/ChangeLog index 9d2a4ee..8484510 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -1,3 +1,26 @@ +2007-06-18 Daniel Baumann + + * 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 + + * scripts/live-bottom/*: + - Added generic header. + 2007-05-12 Daniel Baumann * scripts/live: diff --git a/manpages/live-initramfs.en.7 b/manpages/live-initramfs.en.7 index 03a1e7e..dfe8990 100644 --- a/manpages/live-initramfs.en.7 +++ b/manpages/live-initramfs.en.7 @@ -1,4 +1,4 @@ -.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 @@ -46,16 +46,22 @@ Configure the running locale as specified, if not present the live\-media rootfs 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 diff --git a/manpages/live-snapshot.en.1 b/manpages/live-snapshot.en.1 index e7995db..daeb3d9 100644 --- a/manpages/live-snapshot.en.1 +++ b/manpages/live-snapshot.en.1 @@ -1,4 +1,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 diff --git a/scripts/live b/scripts/live index 04243d7..73a965e 100755 --- a/scripts/live +++ b/scripts/live @@ -60,8 +60,14 @@ parse_cmdline () 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) @@ -131,6 +137,7 @@ is_live_path() { 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 @@ -140,7 +147,7 @@ is_live_path() { get_backing_device() { case "$1" in - *.squashfs|*.ext2) + *.squashfs|*.ext2|*.ext3) echo $(setup_loop "$1" "loop" "/sys/block/loop*" '0' "${LIVE_MEDIA_ENCRYPTION}") ;; *.dir) @@ -167,6 +174,7 @@ mount_images_in_directory() { 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 @@ -230,7 +238,7 @@ copy_live_to() { 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 } @@ -350,13 +358,13 @@ try_snap () 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" @@ -428,7 +436,7 @@ setup_unionfs() { 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}"; @@ -499,7 +507,7 @@ setup_unionfs() { 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 @@ -569,8 +577,8 @@ find_livefs() { 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. diff --git a/scripts/live-bottom/01integrity_check b/scripts/live-bottom/01integrity_check index 46a5790..bd88a76 100755 --- a/scripts/live-bottom/01integrity_check +++ b/scripts/live-bottom/01integrity_check @@ -1,18 +1,23 @@ #!/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 diff --git a/scripts/live-bottom/02_timezone b/scripts/live-bottom/02_timezone index 873c1da..bafc426 100755 --- a/scripts/live-bottom/02_timezone +++ b/scripts/live-bottom/02_timezone @@ -1,21 +1,31 @@ -#! /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 diff --git a/scripts/live-bottom/02etc_live_conf b/scripts/live-bottom/02etc_live_conf index f0bbd96..e52d913 100755 --- a/scripts/live-bottom/02etc_live_conf +++ b/scripts/live-bottom/02etc_live_conf @@ -1,24 +1,30 @@ #!/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 @@ -37,3 +43,5 @@ export HOSTNAME="$HOSTNAME" EOF fi + +log_end_msg diff --git a/scripts/live-bottom/05mountpoints b/scripts/live-bottom/05mountpoints index 36c2972..82cc7c3 100755 --- a/scripts/live-bottom/05mountpoints +++ b/scripts/live-bottom/05mountpoints @@ -1,29 +1,35 @@ #!/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 diff --git a/scripts/live-bottom/10adduser b/scripts/live-bottom/10adduser index 394f007..f4c42f8 100755 --- a/scripts/live-bottom/10adduser +++ b/scripts/live-bottom/10adduser @@ -1,24 +1,30 @@ #!/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` @@ -52,6 +58,9 @@ set passwd/username 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 @@ -90,6 +99,8 @@ EOF 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/ diff --git a/scripts/live-bottom/12fstab b/scripts/live-bottom/12fstab index fa9c642..389f53e 100755 --- a/scripts/live-bottom/12fstab +++ b/scripts/live-bottom/12fstab @@ -1,25 +1,32 @@ #!/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 </dev/null; then # Disable first-login wizard for KDE if [ ! -f /root/etc/kde3/kpersonalizerrc ]; then diff --git a/scripts/live-bottom/18hostname b/scripts/live-bottom/18hostname index 3a54e87..e854eb2 100755 --- a/scripts/live-bottom/18hostname +++ b/scripts/live-bottom/18hostname @@ -1,24 +1,30 @@ -#! /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 </dev/null) || gnome_screensaver_version="" if [ -n "$gnome_screensaver_version" ]; then diff --git a/scripts/live-bottom/23etc_modules b/scripts/live-bottom/23etc_modules index 6eec342..82be075 100755 --- a/scripts/live-bottom/23etc_modules +++ b/scripts/live-bottom/23etc_modules @@ -1,24 +1,30 @@ -#! /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 diff --git a/scripts/live-bottom/23networking b/scripts/live-bottom/23networking index ad7ac95..353cda5 100755 --- a/scripts/live-bottom/23networking +++ b/scripts/live-bottom/23networking @@ -1,25 +1,32 @@ -#! /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 diff --git a/scripts/live-bottom/24preseed b/scripts/live-bottom/24preseed index d71b441..1e80a17 100755 --- a/scripts/live-bottom/24preseed +++ b/scripts/live-bottom/24preseed @@ -1,24 +1,30 @@ -#! /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}" diff --git a/scripts/live-bottom/25configure_init b/scripts/live-bottom/25configure_init index b3f6ebf..1152b4b 100755 --- a/scripts/live-bottom/25configure_init +++ b/scripts/live-bottom/25configure_init @@ -1,27 +1,36 @@ #!/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 @@ -61,6 +70,8 @@ if [ -n "$USERNAME" ]; 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 diff --git a/scripts/live-bottom/30accessibility b/scripts/live-bottom/30accessibility index d8286e6..cbff18c 100755 --- a/scripts/live-bottom/30accessibility +++ b/scripts/live-bottom/30accessibility @@ -1,24 +1,30 @@ #!/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="" diff --git a/scripts/live-bottom/31disable_update_notifier b/scripts/live-bottom/31disable_update_notifier index 6c8b96f..976a3d3 100755 --- a/scripts/live-bottom/31disable_update_notifier +++ b/scripts/live-bottom/31disable_update_notifier @@ -1,24 +1,30 @@ #!/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 diff --git a/scripts/live-bottom/32disable_hibernation b/scripts/live-bottom/32disable_hibernation index 813abed..b75dbd9 100755 --- a/scripts/live-bottom/32disable_hibernation +++ b/scripts/live-bottom/32disable_hibernation @@ -1,25 +1,30 @@ #!/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 diff --git a/scripts/live-bottom/33enable_apport_crashes b/scripts/live-bottom/33enable_apport_crashes index 1fb1145..0f177ab 100755 --- a/scripts/live-bottom/33enable_apport_crashes +++ b/scripts/live-bottom/33enable_apport_crashes @@ -1,24 +1,30 @@ #!/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 diff --git a/scripts/live-bottom/34disable_kwallet b/scripts/live-bottom/34disable_kwallet index 9fd0c26..767f9f8 100755 --- a/scripts/live-bottom/34disable_kwallet +++ b/scripts/live-bottom/34disable_kwallet @@ -1,24 +1,30 @@ -#! /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 diff --git a/scripts/live-bottom/35fix_language_selector b/scripts/live-bottom/35fix_language_selector index 1fb78e5..1c9af0a 100755 --- a/scripts/live-bottom/35fix_language_selector +++ b/scripts/live-bottom/35fix_language_selector @@ -1,24 +1,30 @@ -#! /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 diff --git a/scripts/live-bottom/40install_driver_updates b/scripts/live-bottom/40install_driver_updates index 698ed02..66ae123 100755 --- a/scripts/live-bottom/40install_driver_updates +++ b/scripts/live-bottom/40install_driver_updates @@ -1,29 +1,35 @@ -#! /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" diff --git a/scripts/live-bottom/41apt_cdrom b/scripts/live-bottom/41apt_cdrom index 97b2cdc..bbfa845 100755 --- a/scripts/live-bottom/41apt_cdrom +++ b/scripts/live-bottom/41apt_cdrom @@ -1,24 +1,34 @@ -#! /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 diff --git a/scripts/live-helpers b/scripts/live-helpers index eac2175..8f28f3b 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -204,7 +204,7 @@ find_cow_device() { } 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}" @@ -213,7 +213,7 @@ find_files() 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