# Installing executables
mkdir -p $(DESTDIR)/sbin
- cp bin/live-getty bin/live-login bin/live-snapshot $(DESTDIR)/sbin
+ cp bin/live-getty bin/live-login bin/live-new-uuid bin/live-snapshot $(DESTDIR)/sbin
mkdir -p $(DESTDIR)/usr/share/live-initramfs
- cp bin/live-preseed bin/live-reconfigure $(DESTDIR)/usr/share/live-initramfs
+ cp bin/live-preseed bin/live-reconfigure contrib/languagelist $(DESTDIR)/usr/share/live-initramfs
mkdir -p $(DESTDIR)/usr/share/initramfs-tools
cp -r hooks scripts $(DESTDIR)/usr/share/initramfs-tools
cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-initramfs
mkdir -p $(DESTDIR)/usr/share/doc/live-initramfs/examples
- cp -r conf/live.conf $(DESTDIR)/usr/share/doc/live-initramfs/examples
+ cp -r conf/* $(DESTDIR)/usr/share/doc/live-initramfs/examples
# Installing manpages
set -e; for MANPAGE in manpages/*.en.1; \
sed -i -e 's/2007\\-11\\-19/2007\\-11\\-26/' \
-e 's/2007-11-19/2007-11-26/' \
-e 's/19.11.2007/26.11.2007/' \
- -e 's/1.110.7/1.110.8/' \
+ -e 's/1.113.1/1.113.2/' \
$$FILE; \
done
+ # Update language list
+ wget -O "contrib/languagelist" \
+ "http://svn.debian.org/viewsvn/*checkout*/d-i/trunk/packages/localechooser/languagelist"
+
clean:
distclean:
--- /dev/null
+#!/bin/sh
+# -*- coding: utf-8 -*-
+#
+# «casper-new-uuid» - Creates and injects new UUIDs for casper disks
+#
+# Create new UUIDs for disks to prevent conflicts and booting the wrong casper
+# directory. Particularly useful in creating recovery disks that need to be
+# able to also work with recovery partitioning schemes.
+#
+# Copyright (C) 2008, Dell Inc.
+#
+# Author:
+# - Mario Limonciello <Mario_Limonciello@Dell.com>
+#
+# This script is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2 of the License, or at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this application; if not, write to the Free Software Foundation, Inc., 51
+# Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##################################################################################
+
+set -e
+
+help() {
+ echo
+ echo "USAGE: $0 initrd.gz <path-to-new-initrd.gz> <path-to-new-casper-uuid> "
+ echo
+ echo "initrd.gz is the absolute path to the original gzipped initramfs"
+ echo "<path-to-new-initrd.gz> is the destination directory for the new gzipped initramfs"
+ echo "<path-to-new-casper-uuid> is the destination directory for the new casper-uuid-TYPE "
+ echo
+ echo "if either path is absent, they will end up in the current directory "
+ echo "TYPE is determined by an already existing casper-uuid-* or by 'uname -s'"
+}
+
+if [ "$#" = "0" ] || [ "x$1" = x-h ] || [ "x$1" = x--help ]; then
+ help
+ exit 3
+fi
+
+CWD=`pwd`
+TEMPDIR=`mktemp -d /tmp/uuid-XXXXXX`
+TYPE=`uname -r | cut -d '-' -f 3`
+
+if [ -z "$2" ] || [ ! -d "$2" ] || [ "$2" = "." ]; then
+ GZIPDIR="$CWD"
+else
+ GZIPDIR="$2"
+fi
+
+if [ -z "$3" ] || [ ! -d "$3" ] || [ "$3" = "." ]; then
+ CASPERDIR="$CWD"
+else
+ CASPERDIR="$3"
+fi
+
+cd "$TEMPDIR"
+zcat "$1" | cpio -id
+uuidgen -r > conf/uuid.conf
+find . | cpio --quiet --dereference -o -H newc | gzip > "$GZIPDIR/initrd.gz"
+if [ "$(ls "$CASPERDIR/casper-uuid"-* >/dev/null 2>&1 | wc -l)" = 1 ]; then
+ cp conf/uuid.conf "$CASPERDIR/casper-uuid"-*
+else
+ cp conf/uuid.conf "$CASPERDIR/casper-uuid-$TYPE"
+fi
+cd "$CWD"
+rm -rf "$TEMPDIR"
# live-snapshot - utility to manage Debian Live systems snapshots
#
-# This program mount a device (fallback to /tmpfs under /mnt/snapshot
-# and save the /live/cow (or a different dir) filesystem in it for reusing
-# in another live-initramfs session. Look at manpage for more info.
+# This program mounts a device (fallback to /tmpfs under $MOUNTP
+# and saves the /live/cow (or a different directory) filesystem in it
+# for reuse in another live-initramfs session.
+# Look at the manpage for more informations.
#
-# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
+# Copyright (C) 2006-2008 Marco Amadori <marco.amadori@gmail.com>
+# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
-# This program is free software; you can redistribute it and/or modify
+# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# On Debian systems, the complete text of the GNU General Public License
-# can be found in /usr/share/common-licenses/GPL-2 file.
+# can be found in /usr/share/common-licenses/GPL-3 file.
-PROGRAM="$(basename $0)"
-VERSION=0.0.1
+# declare here two vars from /etc/live.conf because of "set -u"
+ROOTSNAP=""
+HOMESNAP=""
-# Source live conf
-if [ -e /etc/live.conf ]
-then
- . /etc/live.conf
-else
- USERNAME=$(cat /etc/passwd | grep "999" | cut -f1 -d ':')
- HOSTNAME=$(hostname)
-fi
+set -eu
+
+. /usr/share/initramfs-tools/scripts/live-helpers
+
+LIVE_CONF="/etc/live.conf"
+. "${LIVE_CONF}"
export USERNAME USERFULLNAME HOSTNAME
-# Source helper functions
-helpers="/usr/share/initramfs-tools/scripts/live-helpers"
+EXECUTABLE="${0}"
+PROGRAM=$(basename "${EXECUTABLE}")
-if [ -e "${helpers}" ]
-then
- . "${helpers}"
-else
- echo "Error: I cannot found helper functions \"${helpers}\"."
- exit 1
-fi
+# Needs to be available at run and reboot time
+SAFE_TMPDIR="/live"
-# Define LSB log_* functions.
-# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
-. /lib/lsb/init-functions
+# Permits multiple runs
+MOUNTP="$(mktemp -d -p ${SAFE_TMPDIR} live-snapshot-mnt.XXXXXX)"
+DEST="${MOUNTP}/live-sn.cpio.gz"
+DEF_SNAP_COW="/live/cow"
+TMP_FILELIST="${PROGRAM}.list"
-MOUNTP=""
-COW=""
-DEV=""
-DEST=""
-TYPE=""
-DESKTOP_LINK=""
+# Command line defaults and declarations
+SNAP_COW="${DEF_SNAP_COW}"
+SNAP_DEV=""
+SNAP_OUTPUT=""
+SNAP_RESYNC_STRING=""
+SNAP_TYPE="cpio"
+SNAP_LIST="/etc/live-snapshot.list"
+
+Error ()
+{
+ echo "${PROGRAM}: error:" ${@}
+ exit 1
+}
+
+panic ()
+{
+ Error ${@}
+}
Header ()
{
- echo "${PROGRAM} - utility to do Debian Live snapshots"
+ echo "${PROGRAM} - utility to perform snapshots of Debian Live systems"
echo
- echo "Usage: ${PROGRAM} [-c|--cow DIRECTORY] [-d|--device DEVICE] [-o|--output FILE] [-t|--type TYPE]"
- echo "Usage: ${PROGRAM} [-r|--resync-string STRING]"
- echo "Usage: ${PROGRAM} [-h|--help]"
- echo "Usage: ${PROGRAM} [-u|--usage]"
- echo "Usage: ${PROGRAM} [-v|--version]"
+ echo "usage: ${PROGRAM} [-c|--cow DIRECTORY] [-d|--device DEVICE] [-o|--output FILE] [-t|--type TYPE]"
+ echo " ${PROGRAM} [-r|--resync-string STRING]"
+ echo " ${PROGRAM} [-f|--refresh]"
+ echo " ${PROGRAM} [-h|--help]"
+ echo " ${PROGRAM} [-u|--usage]"
+ echo " ${PROGRAM} [-v|--version]"
}
-Usage ()
+Help ()
{
- MESSAGE=${1}
-
Header
echo
- echo "Try \"${PROGRAM} --help\" for more information."
+ echo "Options:"
+ echo " -c, --cow: copy on write directory (default: ${SNAP_COW})."
+ echo " -d, --device: output snapshot device (default: ${SNAP_DEV:-auto})."
+ echo " -o, --output: output image file (default: ${DEST})."
+ echo " -r, --resync-string: internally used to resync previous made snapshots."
+ echo " -f, --refresh: try to sync a running snapshot."
+ echo " -t, --type: snapshot filesystem type. Options: \"squashfs\", \"ext2\", \"ext3\", \"jffs2\" or \"cpio\".gz archive (default: ${SNAP_TYPE})"
+ echo
+ echo "Look at live-snapshot(1) man page for more information."
- if [ ! -z "${MESSAGE}" ]
- then
- /bin/echo -e "${MESSAGE}"
- exit 1
- else
- exit 0
- fi
+ exit 0
}
-Help ()
+Usage ()
{
Header
echo
- 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 " -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)"
- /bin/echo -e "\nLook at live-snapshot(1) man page for more information."
+ echo "Try \"${PROGRAM} --help\" for more information."
exit 0
}
Version ()
{
- echo "${PROGRAM}, version ${VERSION}"
+ echo "${PROGRAM}"
echo
echo "Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>"
+ echo "Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>"
echo
echo "This program is free software; you can redistribute it and/or modify"
echo "it under the terms of the GNU General Public License as published by"
exit 0
}
-Do_snapshot ()
+Try_refresh ()
{
- case "${TYPE}" in
- squashfs)
- echo "./tmp/exclude_list" > /tmp/exclude_list
- ( cd "${COW}" && find . -name '*.wh.*' >> /tmp/exclude_list )
- mksquashfs "${COW}" "${DEST}" -ef /tmp/exclude_list || exit 1
- rm /tmp/exclude_list
- ;;
-
- cpio)
- ( cd "${COW}" && find . -path '*.wh.*' -prune -o -print0 | cpio --quiet -o0 -H newc | gzip -9c > "${DEST}" ) || exit 1
- ;;
-
- 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
- ;;
-
- *)
- echo "Internal error."
- exit 1
- ;;
- esac
-}
+ FOUND=""
+ if [ -n "${ROOTSNAP}" ]; then
+ "${EXECUTABLE}" --resync-string="${ROOTSNAP}"
+ FOUND="Yes"
+ fi
-Is_same_mount ()
-{
- dir1="$(Base_path ${1})"
- dir2="$(Base_path ${2})"
+ if [ -n "${HOMESNAP}" ]; then
+ "${EXECUTABLE}" --resync-string="${HOMESNAP}"
+ FOUND="Yes"
+ fi
- if [ "${dir1}" = "${dir2}" ]
+ if [ -z "${FOUND}" ]
then
- return 0
- else
- return 1
+ echo "No autoconfigured snapshots found at boot;" > /dev/null 1>&2
+ echo "(no resync string in ${LIVE_CONF})." > /dev/null 1>&2
+ exit 1
fi
}
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})"
-
- if [ "${?}" != "0" ]
- then
- echo "Terminating." >&2
- exit 1
- fi
+ ARGS="${*}"
+ ARGUMENTS="$(getopt --longoptions cow:,device:,output,resync-string:,refresh,type:,help,usage,version --name=${PROGRAM} --options c:d:o:t:r:fhuv --shell sh -- ${ARGS})"
eval set -- "${ARGUMENTS}"
;;
-r|--resync-string)
- SNAP_RSTRING="${2}"
+ SNAP_RESYNC_STRING="${2}"
break
;;
+ -f|--refresh)
+ Try_refresh
+ exit 0
+ ;;
+
-h|--help)
Help
;;
;;
*)
- echo "Internal error."; exit 1 ;;
+ Error "internal error."
+ ;;
esac
done
}
-Mount_device ()
-{
- dev="${1}"
-
- if [ ! -d "${MOUNTP}" ]
- then
- mkdir -p "${MOUNTP}"
- fi
-
- if [ -z "${dev}" ]
- then
- # create a temp
- mount -t tmpfs -o rw tmpfs "${MOUNTP}"
-
- if [ ! -L /home/${USERNAME}/Desktop/live-snapshot ]
- then
- ln -s "${MOUNTP}" /home/${USERNAME}/Desktop/live-snapshot
- fi
- else
- if [ -b "${dev}" ]
- then
- try_mount "${dev}" "${MOUNTP}" rw
- fi
- fi
-}
-
Defaults ()
{
- MOUNTP="/mnt/live-snapshot"
- COW="/live/cow"
- DEV=""
- DEST="${MOUNTP}/live-sn.cpio.gz"
- TYPE="cpio"
- DESKTOP_LINK=/home/${USERNAME}/Desktop/live-snapshot
-
- if [ -n "${SNAP_RSTRING}" ]
+ # Parse resync string
+ if [ -n "${SNAP_RESYNC_STRING}" ]
then
- COW=$(echo "${SNAP_RSTRING}" | cut -f1 -d ':')
- DEV=$(echo "${SNAP_RSTRING}" | cut -f2 -d ':')
- DEST=$(echo "${SNAP_RSTRING}" | cut -f3 -d ':')
+ SNAP_COW=$(echo "${SNAP_RESYNC_STRING}" | cut -f1 -d ':')
+ SNAP_DEV=$(echo "${SNAP_RESYNC_STRING}" | cut -f2 -d ':')
+ DEST="${MOUNTP}/$(echo ${SNAP_RESYNC_STRING} | cut -f3 -d ':')"
case "${DEST}" in
*.cpio.gz)
- TYPE="cpio"
+ SNAP_TYPE="cpio"
;;
*.squashfs)
- TYPE="squashfs"
+ SNAP_TYPE="squashfs"
;;
- ""|*.ext2|*.ext3)
- TYPE="ext2"
+ *.jffs2)
+ SNAP_TYPE="jffs2"
;;
+ ""|*.ext2|*.ext3)
+ SNAP_TYPE="ext2"
+ ;;
*)
- Usage "Unregognized String"
+ Error "unrecognized resync string"
;;
esac
- else
- DEF_COW="/live/cow"
-
- # Bad options handling
- if [ -z "${SNAP_COW}" ]
- then
- COW="${DEF_COW}"
- else
- COW="${SNAP_COW}"
- fi
-
+ elif [ -z "${SNAP_OUTPUT}" ]
+ then
+ # Set target file based on image
case "${SNAP_TYPE}" in
- "cpio"|"squashfs"|"ext2"|"ext3")
- TYPE="${SNAP_TYPE}"
+ cpio)
+ DEST="${MOUNTP}/live-sn.cpio.gz"
;;
- "")
- TYPE="cpio"
+ squashfs|jffs2|ext2)
+ DEST="${MOUNTP}/live-sn.${SNAP_TYPE}"
;;
- *)
- Usage "Error: unrecognized snapshot type"
+ ext3)
+ DEST="${MOUNTP}/live-sn.ext2"
;;
esac
+ else
+ DEST="${SNAP_OUTPUT}"
+ fi
+}
+
+Validate_input ()
+{
+ case "${SNAP_TYPE}" in
+ cpio|squashfs|jffs2|ext2|ext3)
+ ;;
+
+ *)
+ Error "invalid filesystem type \"${SNAP_TYPE}\""
+ ;;
+ esac
- #if [ -d
- #if Is_same_mount
+ if [ ! -d "${SNAP_COW}" ]
+ then
+ Error "${SNAP_COW} is not a directory"
+ fi
+
+ if [ "$(id -u)" -ne 0 ]
+ then
+ Error "you are not root"
fi
+}
+
+Mount_device ()
+{
+ case "${SNAP_DEV}" in
+ "")
+ # create a temp
+ mount -t tmpfs -o rw tmpfs "${MOUNTP}"
+ ;;
- # check vars
- if [ ! -d "${COW}" ]
+ *)
+ if [ -b "${SNAP_DEV}" ]
+ then
+ try_mount "${SNAP_DEV}" "${MOUNTP}" rw
+ fi
+ ;;
+ esac
+}
+
+Do_filelist ()
+{
+ # BUGS: supports only cpio.gz types right now
+ TMP_FILELIST=$1
+ if [ -f "${SNAP_LIST}" ]
then
- Usage "Error: ${COW} is not a directory"
+ # Generate include list
+ for entry in $(cat "${SNAP_LIST}" | grep -v '^#.*$' | grep -v '^ *$')
+ do
+ if [ -f "${entry}" ]
+ then
+ printf "%s\000" "${entry}" >> "${TMP_FILELIST}"
+ elif [ -d "${entry}" ]
+ then
+ cd /
+ find "${entry}" -print0 >> "${TMP_FILELIST}"
+ cd "${OLDPWD}"
+ fi
+ done
+
+ if [ "${SNAP_COW}" = "${DEF_SNAP_COW}" ]
+ then
+ # Relative to rootfs
+ echo "/"
+ else
+ # Mostly "/home"
+ echo "${SNAP_COW}"
+ fi
+ else
+ cd "${SNAP_COW}"
+ find . -path '*.wh.*' -prune -o -print0 >> "${TMP_FILELIST}"
+ cd "${OLDPWD}"
+ echo "${SNAP_COW}"
fi
+}
+
+Do_snapshot ()
+{
+ TMP_FILELIST=$(mktemp -p "${SAFE_TMPDIR}" "${TMP_FILELIST}.XXXXXX")
+
+ case "${SNAP_TYPE}" in
+ squashfs)
+ echo ".${TMP_FILELIST}" > "${TMP_FILELIST}"
+ # Removing whiteheads of unionfs
+ cd "${SNAP_COW}"
+ find . -name '*.wh.*' >> "${TMP_FILELIST}"
+ cd "${OLDPWD}"
+ mksquashfs "${SNAP_COW}" "${DEST}" -ef "${TMP_FILELIST}"
+ ;;
+
+ cpio)
+ WORKING_DIR=$(Do_filelist "${TMP_FILELIST}")
+ cd "${WORKING_DIR}"
+ cat "${TMP_FILELIST}" | cpio --quiet -o0 -H newc | gzip -9c > "${DEST}" || exit 1
+ cd "${OLDPWD}"
+ ;;
+
+ ext2|ext3)
+ DU_DIM="$(du -ks ${SNAP_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-percentage=0 --root="${SNAP_COW}" "${DEST}"
+ ;;
+
+ jffs2)
+ mkfs.jffs2 --root="${SNAP_COW}" --output="${DEST}"
+ ;;
+ esac
- Mount_device ${DEV}
+ if [ -f "${TMP_FILELIST}" ]
+ then
+ rm -f "${TMP_FILELIST}"
+ fi
}
Clean ()
{
- if [ -n "${DEV}" ]
+ if [ -z "${SNAP_RESYNC_STRING}" ] && echo "${DEST}" | grep -q "${MOUNTP}"
then
+ echo "${DEST} is present on ${MOUNTP}, therefore no automatic unmounting the latter." > /dev/null 1>&2
+ else
umount "${MOUNTP}"
rmdir "${MOUNTP}"
- #rm
+ fi
+}
+
+Warn_user ()
+{
+ if [ -z "${SNAP_RESYNC_STRING}" ]
+ then
+ case ${SNAP_TYPE} in
+ cpio|ext2|ext3)
+ echo "Please move ${DEST} (if is not already in it)" > /dev/null 1>&2
+ echo "in a supported writable partition (e.g ext3, vfat)." > /dev/null 1>&2
+ ;;
+
+ squashfs)
+ echo "To use ${DEST} you need to rebuild your media or add it" > /dev/null 1>&2
+ echo "to your multisession disc under the \"/live\" directory." > /dev/null 1>&2
+ ;;
+
+ jffs2)
+ echo "Please cat or flashcp ${DEST} to your partition in order to start using it." > /dev/null 1>&2
+ ;;
+ esac
+
+ if grep -qv persistent /proc/cmdline
+ then
+ echo "Remember to boot this live system with \"persistent\" specified at boot prompt." > /dev/null 1>&2
+ fi
fi
}
{
Parse_args "${@}"
Defaults
+ Validate_input
+ trap 'Clean' EXIT
+ Mount_device
Do_snapshot
- Clean
+ Warn_user
}
-Main "${@}"
+Main "${@:-}"
--- /dev/null
+# /etc/live-snapshot resync list example
+#
+# If this file is present, each uncommented not empty line will be parsed when
+# running live-snapshot and included in target snapshot.
+#
+# The syntax for the line is just a full file or directory pathname.
+# Those files and directories, and only those will be included on automatic persistence handling.
+
+# Include itself for reuse
+/etc/live-snapshot.list
+
+# Include networking setups
+/etc/network/interfaces
+/etc/resolv.conf
+/etc/hosts
+
+# Include the whole Desktop directory of the default user
+#/home/user/Desktop
# /etc/live.conf - configuration file for live-initramfs(7)
-# We have a Debian based system of course:
-export BUILD_SYSTEM="Debian"
+USERNAME="user"
+USERFULLNAME="Debian Live user"
+HOSTNAME="debian"
-# grml specific settings:
-export USERNAME="grml"
-export USERFULLNAME="grml user"
-export HOSTNAME="grml"
-
-# unionfs or aufs?
-export UNIONTYPE="aufs"
-# we do not want to have a modified /etc/initab:
-export NOAUTOLOGIN="Yes"
-# grml does not require /fastboot:
-export NOFASTBOOT="Yes"
-# disable "mount failed for selinuxfs on /selinux" warning message:
-export SELINUX_INIT="No"
-# do not touch /etc/sudoers:
-export NOSUDO="Yes"
-# do not touch anything inside passwd/shadow/group/gshadow:
-export NOUSER="Yes"
-# do not generate xorg.conf via dexconf - let's use grml-x instead:
-export NOXAUTOCONFIG="Yes"
-# do not modify /etc/fstab:
-export NOFSTAB="Yes"
-# do not modify /etc/hosts:
-export NOHOSTS="Yes"
-
-export NOACCESSIBILITY="Yes"
-export NOAPPARMOR="Yes"
-export NOAPTCDROM="Yes"
-export NOCONSOLEKEYBOARD="Yes"
-export NOFSTAB="Yes"
-export NOKPERSONALIZER="Yes"
-export NOKWALLET="Yes"
-export NOLANGUAGESELECTOR="Yes"
-export NOLOCALES="Yes"
-export NONETWORKING="Yes"
-export NOPERSISTENT="Yes"
-export NOPOWERMANAGEMENT="Yes"
-export NOPRESEED="Yes"
-export NOPROGRAMCRASHES="Yes"
-export NORESTRICTEDMANAGER="Yes"
-export NOTIMEZONE="Yes"
-export NOUPDATENOTIFIER="Yes"
-export NOXAUTOLOGIN="Yes"
-export NOXSCREENSAVER="Yes"
-export NOGNOMEPANEL="Yes"
-
-# EOF
+export USERNAME USERFULLNAME HOSTNAME
--- /dev/null
+#
+# This is the complete list of languages (locales) to choose from.
+# langcode;language (en);language (orig);supported_environments;countrycode;fallbacklocale;langlist;console-data
+sq;Albanian;Shqip;2;AL;sq_AL.UTF-8;;kbd=lat0-sun16(utf8)
+am;Amharic;አማርኛ;4;ET;am_ET;;
+ar;Arabic;عربي;3;EG;ar_EG.UTF-8;;console-setup
+eu;Basque;Euskaraz;1;ES;eu_ES.UTF-8;;kbd=lat0-sun16(utf8)
+be;Belarusian;Беларуская;2;BY;be_BY.UTF-8;;console-setup
+bn;Bengali;বাংলা;4;BD;bn_BD;;
+bs;Bosnian;Bosanski;2;BA;bs_BA.UTF-8;;kbd=Lat2-Terminus16(utf8)
+bg;Bulgarian;Български;2;BG;bg_BG.UTF-8;;console-setup
+# For C locale, set language to 'en' to make sure questions are "translated"
+# to English instead of showing codes.
+C;C;No localization;0;;C;en;
+ca;Catalan;Català;1;ES;ca_ES.UTF-8;;kbd=lat0-sun16(utf8)
+# Special case for Chinese as the two flavours share the same ISO 639 code
+# Both will trigger countrychooser. Each will be the backup for the other
+# one
+zh_CN;Chinese (Simplified);中文(简体);3;CN;zh_CN.UTF-8;zh_CN:zh;
+zh_TW;Chinese (Traditional);中文(繁體);3;TW;zh_TW.UTF-8;zh_TW:zh;
+hr;Croatian;Hrvatski;2;HR;hr_HR.UTF-8;;kbd=lat2-sun16(utf8)
+cs;Czech;Čeština;2;CZ;cs_CZ.UTF-8;;kbd=lat2-sun16(utf8)
+da;Danish;Dansk;1;DK;da_DK.UTF-8;;kbd=lat0-sun16(utf8)
+nl;Dutch;Nederlands;1;NL;nl_NL.UTF-8;;kbd=lat0-sun16(utf8)
+dz;Dzongkha;རྫོང་ཁ།;4;BT;dz_BT;;
+en;English;English;0;US;en_US.UTF-8;;kbd=lat0-sun16(utf8)
+# The Esperanto locale *is* (or will be as of 1/11/2006) eo.UTF-8
+# so no country on purpose. The default country is Antarctica because...
+# ...why not..:-)
+eo;Esperanto;Esperanto;2;AQ;eo.UTF-8;;console-setup
+et;Estonian;Eesti;2;EE;et_EE.UTF-8;;kbd=lat0-sun16(utf8)
+fi;Finnish;Suomi;1;FI;fi_FI.UTF-8;;kbd=lat0-sun16(utf8)
+fr;French;Français;1;FR;fr_FR.UTF-8;;console-setup
+gl;Galician;Galego;1;ES;gl_ES.UTF-8;;kbd=lat0-sun16(utf8)
+ka;Georgian;ქართული;4;GE;ka_GE.UTF-8;;console-setup
+de;German;Deutsch;1;DE;de_DE.UTF-8;;kbd=lat0-sun16(utf8)
+el;Greek;Ελληνικά;2;GR;el_GR.UTF-8;;console-setup
+gu;Gujarati;ગુજરાતી;4;IN;gu_IN;;
+he;Hebrew;עברית;3;IL;he_IL.UTF-8;;console-setup
+hi;Hindi;हिन्दी ;4;IN;hi_IN;;
+hu;Hungarian;Magyar;2;HU;hu_HU.UTF-8;;kbd=lat2-sun16(utf8)
+#X is;Icelandic;Íslenska;1;IS;is_IS.UTF-8;;kbd=lat9u-16(utf8)
+id;Indonesian;Bahasa Indonesia;1;ID;id_ID.UTF-8;;kbd=lat0-sun16(utf8)
+#X ga;Irish;Gaeilge;1;IE;ga_IE.UTF-8;;kbd=lat0-sun16(utf8)
+it;Italian;Italiano;1;IT;it_IT.UTF-8;;kbd=lat0-sun16(utf8)
+ja;Japanese;日本語;3;JP;ja_JP.UTF-8;;
+#X kn;Kannada;ಕನ್ನಡ;4;IN;kn_IN;;
+#X ks;Kashmiri;कोशुर;4;IN;ks_IN;;
+#X kk;Kazakh;Қазақ;2;KZ;kk_KZ.UTF-8;;console-setup
+km;Khmer;ខ្មែរ;4;KH;km_KH;;
+ko;Korean;한국어;3;KR;ko_KR.UTF-8;;
+ku;Kurdish;Kurdî;2;TR;ku_TR.UTF-8;;kbd=Lat15-Terminus16(utf8)
+#X lo;Lao;ລາວ;4;LA;lo_LA;;console-setup
+lv;Latvian;Latviski;2;LV;lv_LV.UTF-8;;kbd=lat7-14(utf8)
+lt;Lithuanian;Lietuviškai;2;LT;lt_LT.UTF-8;;kbd=LatArCyrHeb-16(utf8)
+#X mg;Malagasy;Malagasy;1;MG;mg_MG.UTF-8;mg_MG:fr_FR:fr:en;kbd=lat0-sun16(utf8)
+#X ms;Malay;Bahasa Malaysia;1;MY;ms_MY.UTF-8;;kbd=lat0-sun16(utf8)
+ml;Malayalam;മലയാളഠ;4;IN;ml_IN;;
+mr;Marathi;मराठी;4;IN;mr_IN;;
+mk;Macedonian;Македонски;2;MK;mk_MK.UTF-8;;console-setup
+ne;Nepali;नेपाली ;4;NP;ne_NP;;
+# The Sami translation is really incomplete. We however keep Sami on request
+# of Skolelinux as a kind of reward to them..:-). They need to be able to
+# choose Sami as an option so that the Sami locale is set as default
+se_NO;Northern Sami;Sámegillii;1;NO;se_NO.UTF-8;se_NO:nb_NO:nb:no_NO:no:nn_NO:nn:da:sv:en;kbd=lat0-sun(utf8)
+nb_NO;Norwegian Bokmaal;Norsk bokmål;1;NO;nb_NO.UTF-8;nb_NO:nb:no_NO:no:nn_NO:nn:da:sv:en;kbd=lat0-sun16(utf8)
+nn_NO;Norwegian Nynorsk;Norsk nynorsk;1;NO;nn_NO.UTF-8;nn_NO:nn:no_NO:no:nb_NO:nb:da:sv:en;kbd=lat0-sun16(utf8)
+#X fa;Persian;فارسی;3;IR;fa_IR;;console-setup
+pl;Polish;Polski;2;PL;pl_PL.UTF-8;;kbd=lat2-sun16(utf8)
+pt;Portuguese;Português;1;PT;pt_PT.UTF-8;pt:pt_BR:en;kbd=lat0-sun16(utf8)
+pt_BR;Portuguese (Brazil);Português do Brasil;1;BR;pt_BR.UTF-8;pt_BR:pt:en;kbd=lat1-16(utf8)
+pa;Punjabi (Gurmukhi);ਪੰਜਾਬੀ;4;IN;pa_IN;;
+ro;Romanian;Română;2;RO;ro_RO.UTF-8;;kbd=Lat2-Terminus16(utf8)
+ru;Russian;Русский;2;RU;ru_RU.UTF-8;;console-setup
+#X sa;Sanskrit;संस्कृत;4;IN;sa_IN;;
+# Serbian commented for consistency: too incomplete
+#X sr;Serbian;Српски;2;CS;sr_YU.UTF-8@cyrillic;;console-setup
+sk;Slovak;Slovenčina;2;SK;sk_SK.UTF-8;;kbd=lat2-sun16(utf8)
+sl;Slovenian;Slovenščina;2;SI;sl_SI.UTF-8;;kbd=lat2-sun16(utf8)
+es;Spanish;Español;1;ES;es_ES.UTF-8;;kbd=lat0-sun16(utf8)
+sv;Swedish;Svenska;1;SE;sv_SE.UTF-8;;kbd=lat0-sun16(utf8)
+tl;Tagalog;Tagalog;1;PH;tl_PH.UTF-8;;kbd=lat0-sun16(utf8)
+ta;Tamil;தமிழ்;4;IN;ta_IN;;
+#X te;Telugu;తెలుగు;4;IN;te_IN;;
+th;Thai;ภาษาไทย;4;TH;th_TH.UTF-8;;console-setup
+tr;Turkish;Türkçe;2;TR;tr_TR.UTF-8;;kbd=Lat15-Terminus16(utf8)
+uk;Ukrainian;Українська;2;UA;uk_UA.UTF-8;;console-setup
+#X ur;Urdu;اردو;3;PK;ur_PK.UTF-8;;console-setup
+#X ca@valencia;Valencian-Catalan;Valencià-Català;1;ES;ca_ES.UTF-8@valencia;;kbd=lat0-sun16(utf8)
+vi;Vietnamese;Tiếng Việt;3;VN;vi_VN.UTF-8;;console-setup
+#X cy;Welsh;Cymraeg;2;GB;cy_GB.UTF-8;;kbd=iso14.f16(utf8)
+wo;Wolof;Wolof;2;SN;wo_SN;wo:fr:en;
+#X xh;Xhosa;Xhosa;2;ZA;xh_ZA.UTF-8;;kbd=lat0-sun16(utf8)
#!/bin/sh
# Checking depends
-dpkg -l busybox file initramfs-tools sudo user-setup
+dpkg -l busybox file initramfs-tools sudo udev user-setup
# Checking recommends
-dpkg -l eject wget live-initscripts
+dpkg -l eject loop-aes-utils uuid-runtime wget
# Checking suggests
-dpkg -l genext2fs squashfs-tools
+dpkg -l curlftpfs genext2fs httpfs2 squashfs-tools mtd-tools
# Checking other packages
dpkg -l cryptsetup splashy usplash
-live-initramfs (1.110.7-2~grml.03) unstable; urgency=low
+live-initramfs (1.136.2-2~grml.00) unstable; urgency=low
- * Update debian/patches/02_more_verbose_toram.diff: be more
- verbose if we don't have enough memory for toram.
+ * Rebase against current version of live-initramfs in Debian.
- -- Michael Prokop <mika@grml.org> Wed, 20 Feb 2008 15:58:42 +0100
+ -- Michael Prokop <mika@grml.org> Thu, 17 Jul 2008 10:27:51 +0200
-live-initramfs (1.110.7-2~grml.02) unstable; urgency=low
+live-initramfs (1.136.2-1) unstable; urgency=medium
- * Add initial support for LZMA.
+ * Replacing previous imperfect changes for udevadm with check for
+ udevadm and using old commands when beeing on etch. Also handling
+ udevtrigger with udevadm if available.
+ * Correcting httpfs2 inclusion in hook.
- -- Michael Prokop <mika@grml.org> Sun, 25 Nov 2007 21:43:16 +0100
+ -- Daniel Baumann <daniel@debian.org> Wed, 16 Jul 2008 00:00:00 +0200
-live-initramfs (1.110.7-2~grml.01) unstable; urgency=low
+live-initramfs (1.136.1-1) unstable; urgency=medium
- * Rebase grml's version on live-initramfs (1.110.7-1).
+ [ Chris Lamb ]
+ * Fix call to log_warning_msg. Thanks to Bradley Smith
+ <brad@brad-smith.co.uk>.
+ * Expand glob for kernels in post{inst,rm} to include "vmlinux"-prefixed
+ kernels on powerpc.
+ * Check losetup capabilities before specifying to mount as read-only.
+ * Modprobe 'esp' SCSI driver for the benefit of sparc.
+ * Quieten call to modprobe ide-generic.
+ * Move local-top/live to live-premount/modules so it gets called before
+ find_livefs.
+ * Sync bug script "dpkg -l" calls with debian/control
- -- Michael Prokop <mika@grml.org> Sun, 25 Nov 2007 21:17:52 +0100
+ [ Daniel Baumann ]
+ * Defaulting now to aufs if no union= parameter is given.
+ * Merging casper version 1.136.
+ * Merging casper version 1.135.
+ * Merging casper version 1.134.
+ * Merging casper version 1.133.
+ * Converting udev depends into a versioned depends in order to reflect udevadm
+ introduction.
+ * Updating live-snapshot to GPL-3+.
+ * Updating to standards 3.8.0.
+ * Renaming forgotton uuid file to live-uuid.
+
+ [ Marco Amadori ]
+ * udevtrigger replacement.
+ * live-snapshot: fixed the remount helper.
+ * live-snapshot: now supports a static keep file list.
+ * Try to bind /cow to /live/cow if unable to move.
+ * live-snapshot: cleaned some wordings.
+ * live-snapshot: included vital informations on exit.
+ * live-snapshot: new "--refresh" option.
+ * live-snapshot: cleaned and sorted used command line defaults.
+ * live-snapshot: nicer default auto unmount logic.
+ * live-snapshot: honour "-o|--output FILE".
+ * live-snapshot: removed a useless mkdir.
+ * live-snapshot: removed an unused and useless function.
+ * live-snapshot: fixes snapshotting from resync string.
+
+ [ Michal Suchanek ]
+ * Add support for httpfs= and ftpfs= parameters.
+
+ -- Daniel Baumann <daniel@debian.org> Mon, 14 Jul 2008 00:00:00 +0200
+
+live-initramfs (1.132.1-1) unstable; urgency=medium
+
+ [ Chris Lamb ]
+ * Don't escape asterisks in languagelist update code
+
+ [ Daniel Baumann ]
+ * Updating copyright header in live-snapshot.
+ * Removing useless whitespaces and empty lines.
+ * Correcting grammatical errors in live-snapshot description.
+ * Removing live-snapshot version as this component is always released
+ within live-initramfs itself.
+ * Adding Michal Suchanek <hramrach@centrum.cz> to credits file.
+ * Merging casper 1.132.
+ * Merging casper 1.131.
+ * Ignoring floppy devices for live filesystem as well as live
+ persistency.
+ * Adding patch from Michal Suchanek <hramrach@centrum.cz> to tail
+ live.log and show its messages during boot (Closes: #440238).
+ * Updating vcs fields in control file.
+ * Handling conflicting klibc includes with initramfs-hooks of other
+ packages (Closes: 475783).
+
+ [ Marco Amadori ]
+ * Fixes "live-snapshot on reboot could not find a writable '/tmp' or
+ '/mnt'" bug.
+ * Calling live-snapshot now produces an output file.
+
+ [ Michal Suchanek ]
+ * Workaround loop-aes-utils losetup incompatibility
+ * Fix toram (change mount --move to mount -o move)
+
+ -- Daniel Baumann <daniel@debian.org> Mon, 02 Jun 2008 00:00:00 +0200
+
+live-initramfs (1.130.1-3) unstable; urgency=high
+
+ * Handle non-existing klibc includes in live hook (Closes: #475783).
+ * Adding loop-aes-utils to recommends.
+
+ -- Daniel Baumann <daniel@debian.org> Sat, 26 Apr 2008 16:00:00 +0200
+
+live-initramfs (1.130.1-2) unstable; urgency=medium
+
+ [ Chris Lamb ]
+ * Remove bogus dependency on Ubuntu "localechooser-data" package
+
+ -- Daniel Baumann <daniel@debian.org> Thu, 17 Apr 2008 06:00:00 +0200
+
+live-initramfs (1.130.1-1) unstable; urgency=medium
+
+ [ Chris Lamb ]
+ * Use triggers when calling update-initramfs in postinst and postrm
+
+ [ Daniel Baumann ]
+ * Sorting some lines in live hook.
+ * Merging casper 1.130.
+ * Merging casper 1.129.
+ * Adjusting code formating in maintainer scripts.
+ * Restricting counting of installed kernels based on /boot/vmlinuz-*
+ instead of /boot/vmlinuz*.
+
+ -- Daniel Baumann <daniel@debian.org> Mon, 14 Apr 2008 00:00:00 +0200
+
+live-initramfs (1.128.1-1) unstable; urgency=medium
+
+ [ Marco Amadori ]
+ * Fixed a misleading debug message.
+ * Added /cow mounting debug messages.
+ * Fixed /cow mounting.
+ * Klibc: added some libraries to the intramfs.
+
+ [ Daniel Baumann ]
+ * Merging casper 1.128.
+
+ -- Daniel Baumann <daniel@debian.org> Mon, 7 Apr 2008 00:00:00 +0200
+
+live-initramfs (1.127.1-1) unstable; urgency=medium
+
+ [ Daniel Baumann ]
+ * Merging casper 1.127.
+ * Merging casper 1.126.
+ * Removing too early recommends to live-initscripts in control to make
+ some people happy (Closes: #431000).
+
+ [ Chris Lamb ]
+ * hooks/live, scripts/live: Add USB modules, workaround udevtrigger
+ (?) bug
+ * scripts/live-helpers: Don't search ram block devices
+ * scripts/live-helpers: Search / use case
+ * scripts/live-helpers: Fixes for set -e
+ * bin/live-snapshot: Vastly rework script
+ * bin/live-snapshot: Fix argument handling (Closes: #461595)
+ * scripts/live: Make 'nopersistent' parameter actually disable
+ persistence
+
+ -- Daniel Baumann <daniel@debian.org> Mon, 31 Mar 2008 00:00:00 +0200
+
+live-initramfs (1.125.1-1) unstable; urgency=medium
+
+ [ Daniel Baumann ]
+ * Merging casper 1.125.
+
+ [ Chris Lamb ]
+ * scripts/live-helpers: Cosmetic changes to loop-aes passphrase prompt
+ * Rename 18hostname -> 06hostname
+
+ -- Daniel Baumann <daniel@debian.org> Mon, 24 Mar 2008 00:00:00 +0100
+
+live-initramfs (1.124.1-1) unstable; urgency=medium
+
+ [ Daniel Baumann ]
+ * Adjusting live-snapshot to live-initramfs.
+ * Merging casper 1.124.
+ * Adjusting 44pk_allow to live-initramfs.
+ * Merging casper 1.123.
+ * Merging casper 1.122.
+ * Merging casper 1.121.
+ * Merging casper 1.120.
+
+ [ Chris Lamb ]
+ * 99hook: Download hook script from inside target filesystem
+
+ -- Daniel Baumann <daniel@debian.org> Mon, 17 Mar 2008 00:00:00 +0100
+
+live-initramfs (1.119.1-1) unstable; urgency=medium
+
+ * Creating resolv.conf when netbooting not just when there's no
+ resolv.conf, but also when it is empty.
+ * Making hooks executable after fetching them.
+ * Removing disabling of kwallet.
+ * Merging casper 1.119.
+
+ -- Daniel Baumann <daniel@debian.org> Mon, 10 Mar 2008 00:00:00 +0100
+
+live-initramfs (1.118.2-1) unstable; urgency=medium
+
+ [ Andrey Asadchev ]
+ * Explicitly set Xorg video driver.
+ * Patch to use cryptsetup volumes for persistent storage.
+
+ [ Daniel Baumann ]
+ * New upstream release.
+ * Fixing wrong email address in changelog (was bug in git-dch config).
+ * Bumping package to policy 3.7.3.
+ * Rewriting copyright in machine-interpretable format.
+ * Adding hook parameter to execute custom scripts.
+ * Adding plainroot.
+
+ [ Marco Amadori ]
+ * Now it includes lzma kernel module dependencies.
+
+ -- Daniel Baumann <daniel@debian.org> Mon, 3 Mar 2008 00:00:00 +0100
+
+live-initramfs (1.118.1-1) unstable; urgency=medium
+
+ [ Daniel Baumann ]
+ * New upstream release.
+ * Adding direct depends to udev, thanks to Anton Lundin
+ <glance@acc.umu.se> (Closes: #452448).
+ * Merging casper 1.111.
+ * Bumping version to 1.110.1-1.
+ * Merging casper 1.112.
+ * Merging casper 1.113.
+ * Adjusting to live-initramfs.
+ * Bumping version to 1.113.1-1.
+ * Merging casper 1.114.
+ * Merging casper 1.115.
+ * Merging casper 1.116.
+ * Merging casper 1.117.
+ * Merging casper 1.118.
+ * Bumping version to 1.118.1-1.
+
+ [ Otavio Salvador ]
+ * debian: add mtd-tools as suggestion since it's required for jffs2
+ support
+ * hooks: include jffs2 kernel module on initramfs image
+ * live-snapshot: add support to use jffs2 images
+ * live: add support for jffs2 images and snapshots
+ * live-helpers: add jffs2 as a valid image
+ * live-snapshot.en.1: add ext3 and jffs2 images as valid options
+
+ -- Daniel Baumann <daniel@debian.org> Tue, 26 Feb 2008 13:35:00 +0100
live-initramfs (1.110.7-1) unstable; urgency=medium
* Fixing regression from mounting the ow device on a nfs volume,
thanks to An-Cheng Huang <ancheng@vyatta.com>.
- -- Daniel Baumann <daniel@debian> Mon, 19 Nov 2007 00:00:00 +0100
+ -- Daniel Baumann <daniel@debian.org> Mon, 19 Nov 2007 00:00:00 +0100
live-initramfs (1.110.6-1) unstable; urgency=medium
thanks to Jordi Pujol <jordi_pujol@telefonica.net>.
* Fixing some coding style issues.
- -- Daniel Baumann <daniel@debian> Mon, 5 Nov 2007 00:00:00 +0100
+ -- Daniel Baumann <daniel@debian.org> Mon, 5 Nov 2007 00:00:00 +0100
live-initramfs (1.110.4-1) unstable; urgency=medium
[ Jesse Hathaway ]
* add support for mounting the cow device on an nfs volume
- -- Daniel Baumann <daniel@debian> Mon, 29 Oct 2007 00:00:00 +0100
+ -- Daniel Baumann <daniel@debian.org> Mon, 29 Oct 2007 00:00:00 +0100
live-initramfs (1.110.3-1) unstable; urgency=medium
[ Jesse Hathaway ]
* add support for exposedroot option for live-helper
- -- Daniel Baumann <daniel@debian> Mon, 22 Oct 2007 00:00:00 +0200
+ -- Daniel Baumann <daniel@debian.org> Mon, 22 Oct 2007 00:00:00 +0200
live-initramfs (1.110.2-1) unstable; urgency=medium
* Removing nodiratime as it is already included in noatime, thanks to Kel
Modderman <kel@otaku42.de>.
- -- Daniel Baumann <daniel@debian> Mon, 15 Oct 2007 00:00:00 +0200
+ -- Daniel Baumann <daniel@debian.org> Mon, 15 Oct 2007 00:00:00 +0200
live-initramfs (1.110.1-1) unstable; urgency=medium
* Adjusting to live-initramfs.
* Bumping version to 1.110.1-1.
- -- Daniel Baumann <daniel@debian> Mon, 8 Oct 2007 00:00:00 +0200
+ -- Daniel Baumann <daniel@debian.org> Mon, 8 Oct 2007 00:00:00 +0200
live-initramfs (1.107.1-1) unstable; urgency=medium
* Merging casper 1.107.
* Bumping version to 1.107.1-1.
- -- Daniel Baumann <daniel@debian> Mon, 1 Oct 2007 00:00:00 +0200
+ -- Daniel Baumann <daniel@debian.org> Mon, 1 Oct 2007 00:00:00 +0200
live-initramfs (1.104.1-1) unstable; urgency=medium
Maintainer: Debian Live <debian-live-maint@lists.alioth.debian.org>
Uploaders: Daniel Baumann <daniel@debian.org>
Build-Depends: debhelper (>= 5), asciidoc, docbook-xsl, xsltproc
-Standards-Version: 3.7.2
+Standards-Version: 3.8.0
Homepage: http://debian-live.alioth.debian.org/
-Vcs-Git: git://git.debian.org/git/users/daniel/live-initramfs.git
-Vcs-Browser: http://git.debian.org/?p=users/daniel/live-initramfs.git
+Vcs-Browser: http://git.debian.net/?p=live-initramfs.git
+Vcs-Git: git://git.debian.net/git/live-initramfs.git
XS-Upstream-Depends: git-core
Package: live-initramfs
Architecture: all
Depends: ${misc:Depends}, busybox, file, initramfs-tools, sudo, udev, user-setup
-Recommends: eject, wget, live-initscripts
-Suggests: genext2fs, squashfs-tools
+Recommends: eject, loop-aes-utils, uuid-runtime, wget
+Suggests: curlftpfs, genext2fs (>= 1.4.1), httpfs2, squashfs-tools, mtd-tools
Description: Debian Live initramfs hook
live-initramfs is a hook for the initramfs-tools, used to generate a initramfs
capable to boot live systems, such as those created by live-helper. This
At boot time it will look for a (read-only) media containing a "/live"
directory where a root filesystems (often a compressed filesystem image like
squashfs) is stored. If found, it will create a writable environment, using
- unionfs, for Debian like systems to boot from.
+ aufs or unionfs, for Debian like systems to boot from.
.
You probably do not want to install this package onto a non-live system,
although it will do no harm.
-This package was debianized by Daniel Baumann <daniel@debian.org> on
-Mon, 30 Apr 2007 00:00:00 +0200.
-
-It was downloaded from:
-
- <http://debian-live.alioth.debian.org/>
-
-Upstream contact:
-
- Debian Live <debian-live-devel@lists.alioth.debian.org>
-
-License:
-
- live-initramfs is a fork of casper <http://packages.ubuntu.com/casper/>.
- casper was originally written by Tollef Fog Heen <tfheen@canonical.com>
- and Matt Zimmerman <mdz@canonical.com>.
-
- Copyright (C) 2005-2007 Canonical Ltd. <http://www.cannonical.com/>
- Copyright (C) 2006-2007 Marco Amadori <marco.amadori@gmail.com>
- Copyright (C) 2007 Daniel Baumann <daniel@debian.org>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+Author: Daniel Baumann <daniel@debian.org>
+Download: http://debian-live.alioth.debian.org/
+
+live-initramfs is a fork of casper <http://packages.ubuntu.com/casper/>. casper
+was originally written by Tollef Fog Heen <tfheen@canonical.com> and Matt
+Zimmerman <mdz@canonical.com>.
+
+Files: *
+Copyright:
+ (C) 2007-2008 Daniel Baumann <daniel@debian.org>
+ (C) 2005-2008 Canonical Ltd. <http://www.cannonical.com/>
+ (C) 2006-2007 Marco Amadori <marco.amadori@gmail.com>
+ (C) 2008 Dell Inc. <http://www.dell.com/>
+License: GPL-3+
+ This program is free software: you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free Software
+ Foundation, either version 3 of the License, or (at your option) any later
+ version.
+ .
+ This program is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see <http://www.gnu.org/licenses/>.
On Debian systems, the complete text of the GNU General Public License
-can be found in /usr/share/common-licenses/GPL-2 file.
-
-The Debian packaging is (C) 2007, Daniel Baumann <daniel@debian.org> and
-is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'.
+can be found in /usr/share/common-licenses/GPL-3 file.
# Exit if system was not booted by live-initramfs
grep -qs boot=live /proc/cmdline || exit 0
+# Exit if the system was booted from an ISO image rather than a physical CD
+grep -qs find_iso= /proc/cmdline && exit 0
+
# Read configuration variable file if it is present
[ -r /etc/live.conf ] && . /etc/live.conf
@DPATCH@
---- a/hooks/live 2007-11-01 23:05:08.000000000 +0100
-+++ b/hooks/live 2007-11-25 21:39:28.000000000 +0100
-@@ -78,6 +78,8 @@
+--- a/hooks/live 2008-07-17 10:29:18.000000000 +0200
++++ b/hooks/live 2008-07-17 10:29:30.000000000 +0200
+@@ -90,6 +90,8 @@
copy_exec /sbin/losetup /sbin
manual_add_modules loop
manual_add_modules squashfs
+manual_add_modules sqlzma
+manual_add_modules unlzma
-
- # Filesystem: unionfs/aufs
- manual_add_modules unionfs
+
+ # Filesystem: aufs/unionfs
+ manual_add_modules aufs
+
#!/bin/sh
-if [ -x /usr/sbin/update-initramfs ]
+case "$(ls -l /boot/vmlinu* | wc -l)" in
+ 1)
+ # We only have one kernel installed, so we can use "-u"
+ # which will use dpkg-trigger inside update-initramfs
+ INITRAMFS_ARGS="-u"
+ ;;
+
+ *)
+ INITRAMFS_ARGS="-u -k all"
+ ;;
+esac
+
+if [ -x /usr/sbin/update-initramfs ] && [ "${1}" != "triggered" ] && \
+ dpkg --compare-versions "${DPKG_RUNNING_VERSION}" ge "1.14.18"
then
- update-initramfs -k all -u
+ # this activates the trigger, if triggers are working
+ update-initramfs ${INITRAMFS_ARGS}
+else
+ # force it to actually happen
+ DPKG_MAINTSCRIPT_PACKAGE="" update-initramfs ${INITRAMFS_ARGS}
fi
#DEBHELPER#
#!/bin/sh
-if [ -x /usr/sbin/update-initramfs ]
+case "$(ls -l /boot/vmlinu* | wc -l)" in
+ 1)
+ # We only have one kernel installed, so we can use "-u"
+ # which will use dpkg-trigger inside update-initramfs
+ INITRAMFS_ARGS="-u"
+ ;;
+
+ *)
+ INITRAMFS_ARGS="-u -k all"
+ ;;
+esac
+
+if [ -x /usr/sbin/update-initramfs ] && [ "${1}" != "triggered" ] && \
+ dpkg --compare-versions "${DPKG_RUNNING_VERSION}" ge "1.14.18"
then
- update-initramfs -k all -u
+ # this activates the trigger, if triggers are working
+ update-initramfs ${INITRAMFS_ARGS}
+else
+ # force it to actually happen
+ DPKG_MAINTSCRIPT_PACKAGE="" update-initramfs ${INITRAMFS_ARGS}
fi
#DEBHELPER#
--- /dev/null
+activate update-initramfs
* Malcom Gilles <live@ouabain.org>
* Marco Amadori <marco.amadori@gmail.com>
* Mathieu Geli <mathieu.geli@gmail.com>
+ * Michal Suchanek <hramrach@centrum.cz>
* Oliver Osburg <o.osburg@uni-jena.de>
* Otavio Salvador <otavio@debian.org>
* Sebastian Raveau <sebastien.raveau@epita.fr>
+casper (1.136) intrepid; urgency=low
+
+ * Remove bad-and-wrong setting of PATH to include directories under /root;
+ now that grep links to more libraries than before, this broke a number
+ of things. Requires initramfs-tools (>= 0.92bubuntu5) because this
+ doesn't work with klibc chroot.
+
+ -- Colin Watson <cjwatson@ubuntu.com> Fri, 11 Jul 2008 12:34:35 +0100
+
+casper (1.135) intrepid; urgency=low
+
+ [ Loic Minier ]
+ * Fix use of PREREQ instead of PREREQS in hooks/casper.
+
+ [ Colin Watson ]
+ * Fix mount argument ordering for klibc mount.
+
+ -- Colin Watson <cjwatson@ubuntu.com> Wed, 09 Jul 2008 12:34:26 +0100
+
+casper (1.134) intrepid; urgency=low
+
+ [ Evan Dandrea ]
+ * Do not use mode= when mounting /cow using persistent mode (LP: #219192).
+
+ [ Colin Watson ]
+ * Support ?= (set value but don't mark as seen) preseeding syntax for
+ console-setup/* (LP: #64058).
+
+ -- Colin Watson <cjwatson@ubuntu.com> Mon, 30 Jun 2008 23:52:41 +0100
+
+casper (1.133) intrepid; urgency=low
+
+ [ Tormod Volden ]
+ * Do not use swap on RAID raw devices (LP: #136804)
+
+ [ Agostino Russo ]
+ * Test if livemedia is a directory before trying to mount it as a
+ loopfile
+ * Reverted changes to casper-helpers as requested by Mithrandir since
+ replaying the journal on a hibernated system would lead to file system
+ corruption.
+
+ -- Evan Dandrea <evand@ubuntu.com> Wed, 18 Jun 2008 12:34:58 -0400
+
+casper (1.132) intrepid; urgency=low
+
+ [ Colin Watson ]
+ * Switch default unionfs implementation to aufs.
+
+ [ Agostino Russo ]
+ * Do not scan only vfat volumes when looking for cow devices (LP: #230703)
+ * Allow casper to use a squashfs filesystem within an arbitrary path (LP:
+ #230716, #207137)
+
+ -- Evan Dandrea <evand@ubuntu.com> Wed, 28 May 2008 15:01:30 -0400
+
+casper (1.131) hardy; urgency=low
+
+ [ Luke Yelavich ]
+ * scripts/casper-bottom/30accessibility: Set gconf and orca config values as
+ root in automatic-ubiquity, only-ubiquity, and debug-ubiquity modes.
+ * ubiquity-hooks/30accessibility: Remove unneeded gconf call to disable esd.
+
+ [ Colin Watson ]
+ * Ensure that the live CD user's Desktop directory is owned by them, not
+ by root (LP: #218576).
+ * Duplicate a chunk of console-setup logic into the keyboard script so
+ that we can deal with non-Latin keymaps and the like without having to
+ have gfxboot-theme-ubuntu help us; the previous approach broke other
+ uses of console-setup, and thus the alternate install CD (LP: #218754).
+ This should later be replaced by just running console-setup, and I'll
+ open another bug for this.
+
+ -- Colin Watson <cjwatson@ubuntu.com> Mon, 21 Apr 2008 14:52:05 +0100
+
+casper (1.130) hardy; urgency=low
+
+ * Handle use of debian-installer/language for locale selection
+ (LP: #213930).
+
+ -- Colin Watson <cjwatson@ubuntu.com> Sat, 12 Apr 2008 00:30:10 +0100
+
+casper (1.129) hardy; urgency=low
+
+ * Add COPYING file with GPL text (LP: #211923).
+ * Add casper-new-uuid script to simplify UUID regeneration process,
+ contributed by Mario Limonciello of Dell (LP: #209847).
+ * Update casper-snapshot for genext2fs --reserved-blocks =>
+ --reserved-percentage option change (LP: #202048). Add a Breaks as the
+ most lightweight available method of documenting that we need genext2fs
+ >= 1.4.1 for this.
+
+ -- Colin Watson <cjwatson@ubuntu.com> Thu, 10 Apr 2008 01:45:47 +0100
+
+casper (1.128) hardy; urgency=low
+
+ [ Luke Yelavich ]
+ * scripts/casper-bottom/30accessibility &
+ ubiquity-hooks/30accessibility:
+ - Update gconf keys to ensure onboard actually gets loaded.
+ - Change ownership of created orca settings files to the user.
+ - Add extra bits to make orca settings actually work.
+
+ [ Evan Dandrea ]
+ * Add mode=755 to the tmpfs mount that becomes / in the unionfs mount
+ so that / in the live filesystem does not end up with 777 permissions
+ (LP: #206030).
+
+ [ Colin Watson ]
+ * Make scripts/casper-bottom/38disable_restricted_manager executable
+ again.
+ * Depend on uuid-runtime for uuidgen.
+
+ -- Colin Watson <cjwatson@ubuntu.com> Mon, 31 Mar 2008 18:11:55 +0100
+
+casper (1.127) hardy; urgency=low
+
+ * Leave spawning the noninteractive ubiquity frontend to its initscript.
+
+ -- Evan Dandrea <evand@ubuntu.com> Tue, 25 Mar 2008 15:52:32 -0400
+
+casper (1.126) hardy; urgency=low
+
+ * scripts/casper-bottom/10adduser: Test for konqueror not kdesktop,
+ stops putting a broken icon on the Kubuntu KDE 4 desktop
+
+ -- Jonathan Riddell <jriddell@ubuntu.com> Tue, 25 Mar 2008 15:42:31 +0000
+
+casper (1.125) hardy; urgency=low
+
+ [ Colin Watson ]
+ * Stop quoting Exec arguments in .desktop files. Apparently this used to
+ work but now the system conforms more strictly to the desktop entry
+ specification (LP: #204185).
+
+ [ Jonathan Riddell ]
+ * scripts/casper-bottom/15autologin: Enable auto-login for KDM-KDE4
+
+ -- Jonathan Riddell <jriddell@ubuntu.com> Thu, 20 Mar 2008 10:20:17 +0000
+
+casper (1.124) hardy; urgency=low
+
+ [ Colin Watson ]
+ * Name generated snapshot images according to their type (LP: #202699).
+
+ [ Martin Pitt ]
+ * scripts/casper-bottom/44pk_allow_ubuntu: Remove erroneous blank line at
+ the start of PolicyKit.conf, since this is invalid XML. This broke
+ PolicyKit completely on the live system.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 18 Mar 2008 10:20:08 +0100
+
+casper (1.123) hardy; urgency=low
+
+ * Add scripts/casper-bottom/44pk_allow_ubuntu: Allow PolicyKit privileges
+ without password to the default live session user. This avoids the need to
+ press Enter at the password prompt, which is quite confusing. Thanks to
+ MarioDebian! (LP: #201852)
+
+ -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 14 Mar 2008 17:26:37 +0100
+
+casper (1.122) hardy; urgency=low
+
+ * Fix paths in About Kubuntu links
+
+ -- Jonathan Riddell <jriddell@ubuntu.com> Fri, 14 Mar 2008 15:12:38 +0000
+
+casper (1.121) hardy; urgency=low
+
+ * Use a link for About Kubuntu docs in Kubuntu-KDE4
+
+ -- Jonathan Riddell <jriddell@ubuntu.com> Wed, 12 Mar 2008 23:57:50 +0000
+
+casper (1.120) hardy; urgency=low
+
+ * Use dhclient directly instead of ifupdown for the url= kernel cmdline
+ argument so that we don't have to worry about the interfaces file
+ propagating to the installed system.
+
+ -- Evan Dandrea <evand@ubuntu.com> Tue, 11 Mar 2008 13:08:08 -0400
+
+casper (1.119) hardy; urgency=low
+
+ [ Luke Yelavich ]
+ * scripts/casper-bottom/30accessibility &
+ ubiquity-hooks/30accessibility:
+ - Disable compiz for screen reader and braille terminal accessibility
+ profiles. It is currently not possible to get feedback about open
+ windows when cycling through them using ALT + Tab with Compiz.
+ * ubiquity-hooks/30accessibility: Add braille terminal profile.
+
+ [ Colin Watson ]
+ * Always set language in both /etc/default/locale and /etc/environment
+ (thanks, Sebastien Bacher).
+
+ -- Colin Watson <cjwatson@ubuntu.com> Mon, 03 Mar 2008 10:21:42 +0000
+
+casper (1.118) hardy; urgency=low
+
+ [ Julian Andres Klode, Colin Watson ]
+ * Use aufs instead of unionfs if union=aufs is given (LP: #187259).
+
+ -- Colin Watson <cjwatson@ubuntu.com> Thu, 14 Feb 2008 18:00:36 +0000
+
+casper (1.117) hardy; urgency=low
+
+ * Disable speech for magnifier and braille profiles again. Thanks
+ Luke Yelavich.
+ * esd is enabled by default, so the comment in 30accessibility is no
+ longer relevant.
+
+ -- Evan Dandrea <evand@ubuntu.com> Wed, 13 Feb 2008 01:20:22 -0500
+
+casper (1.116) hardy; urgency=low
+
+ * Fix setting orca options in 30accessibility.
+ * Remove gdm and kdm from init when using automatic-ubiquity and
+ only-ubiquity. The ubiquity initscript will take care of spawning
+ these.
+
+ -- Evan Dandrea <evand@ubuntu.com> Mon, 11 Feb 2008 12:19:39 -0500
+
+casper (1.115) hardy; urgency=low
+
+ * Add the user to the groups specified by user-setup-udeb.
+
+ -- Evan Dandrea <evand@ubuntu.com> Thu, 24 Jan 2008 19:08:33 +0000
+
+casper (1.114) hardy; urgency=low
+
+ [ Colin Watson ]
+ * casper-md5check: Close md5_file before exiting.
+ * Disable tracker-applet as well as trackerd, otherwise the former starts
+ the latter.
+ * casper-snapshot: Fix argument parsing (thanks, Tormod Volden;
+ LP: #179411).
+
+ -- Colin Watson <cjwatson@ubuntu.com> Tue, 15 Jan 2008 18:25:21 +0000
+
+casper (1.113) hardy; urgency=low
+
+ [ Tollef Fog Heen ]
+ * dpkg-divert away update-initramfs as it's useless on live CDs and
+ annoying when people install LVM and similar tools in order to rescue
+ a system. LP: #150188
+
+ [ Colin Watson ]
+ * Adjust /etc/sudoers editing code so that it doesn't repeatedly add
+ "NOPASSWD:" in persistent mode (LP: #175159).
+ * Avoid ejecting the CD if booting from an ISO image rather than from a
+ physical CD (thanks, Agostino Russo; LP: #176014).
+
+ -- Colin Watson <cjwatson@ubuntu.com> Wed, 19 Dec 2007 09:17:50 +0000
+
+casper (1.112) hardy; urgency=low
+
+ * hooks/casper: no need to copy udevinfo into the initramfs, it's already
+ there inside udevadm
+ * scripts/casper: call udevadm with trigger and settle arguments
+ * scripts/casper-bottom/23networking: call udevadm with trigger and
+ settle arguments
+ * scripts/casper-helpers: call udevadm with info and settle arguments
+
+ -- Scott James Remnant <scott@ubuntu.com> Fri, 14 Dec 2007 15:00:29 +0000
+
+casper (1.111) hardy; urgency=low
+
+ * Remove code to set the progress bar to throbbing, this now comes as
+ standard so we don't need to duplicate it or override things that
+ attempted to set progress. LP: #162397.
+
+ -- Scott James Remnant <scott@ubuntu.com> Tue, 13 Nov 2007 20:49:31 +0000
+
casper (1.110) gutsy; urgency=low
* Don't generate fglrx or the nvidia modules in the live session at boot;
Boot Parameters for Debian Live
-------------------------------
-Updated for live-initramfs 1.110.7-1 on 2007-11-19.
+Updated for live-initramfs 1.113.1-1 on 2007-11-26.
These options (can be combined) work from the bootloader prompt:
live timezone=TIMEZONE
live todisk=DEVICE
live toram
-live union=unionfs|aufs
+live union=aufs|unionfs
live utc=yes|no
live xdebconf
live xvideomode=RESOLUTION
cp /usr/share/initramfs-tools/scripts/live-functions "${DESTDIR}"/scripts
cp /usr/share/initramfs-tools/scripts/live-helpers "${DESTDIR}"/scripts
+# klibc dependencies
+for FILE in /lib/libacl* /lib/libblkid* /lib/libuuid* /lib/libdevmapper* /lib/libattr*
+do
+ if [ ! -e "${DESTDIR}"/"${FILE}" ]
+ then
+ cp -a "${FILE}" "${DESTDIR}"/"${FILE}"
+ fi
+done
+
# Handling other stuff
# Configuration: keymap (usefull when using encryption)
# Filesystem: ext3
manual_add_modules ext3
+# Filesystem: jffs2
+manual_add_modules jffs2
+
# Filesystem: squashfs
copy_exec /sbin/losetup /sbin
manual_add_modules loop
manual_add_modules squashfs
-# Filesystem: unionfs/aufs
-manual_add_modules unionfs
+# Filesystem: aufs/unionfs
manual_add_modules aufs
+manual_add_modules unionfs
# Filesystem: vfat
manual_add_modules nls_cp437
manual_add_modules sbp2
manual_add_modules sr_mod
+# Hardware: usb
+manual_add_modules sd_mod
+
# Hardware: network
auto_add_modules net
copy_exec /usr/bin/md5sum /bin
# Program: udev
-copy_exec /sbin/udevtrigger /sbin
-copy_exec /sbin/udevsettle /sbin
+if [ -x /sbin/udevadm ]
+then
+ # lenny
+ copy_exec /sbin/udevadm /sbin
+else
+ # etch
+ copy_exec /sbin/udevtrigger /sbin
+ copy_exec /sbin/udevsettle /sbin
+fi
copy_exec /usr/bin/udevinfo /bin
# Program: wget
then
copy_exec /usr/bin/wget /bin
fi
+
+# FUSE kernel module
+manual_add_modules fuse
+
+# FUSE filesystem: httpfs2
+if [ -x /usr/bin/httpfs2_ssl ]
+then
+ copy_exec /usr/bin/httpfs2_ssl /bin/httpfs
+elif [ -x /usr/bin/httpfs2 ]
+then
+ copy_exec /usr/bin/httpfs2 /bin/httpfs
+fi
+
+# FUSE filesystem: curlftpfs
+if [ -x /usr/bin/curlftpfs ]
+then
+ copy_exec /usr/bin/curlftpfs /bin
+fi
At boot time it will look for a (read-only) media containing a "/live"
directory where a root filesystems (often a compressed filesystem image like
squashfs) is stored. If found, it will create a writable environment, using
-unionfs, for Debian like systems to boot from.
+aufs, for Debian like systems to boot from.
You probably do not want to install this package onto a non-live system,
although it will do no harm.
to the computer's RAM before mounting the root filesystem. This could need a lot
of ram, according to the space used by the read-only media.
- union=**unionfs**|**aufs**::
+ union=**aufs**|**unionfs**::
-By default, live-initramfs uses unionfs. With this parameter, you can switch to
-aufs.
+By default, live-initramfs uses aufs. With this parameter, you can switch to
+unionfs.
utc=**yes**|**no**::
This optional file (inside the live media) contains a list of white-space or
carriage-return-separated file names corresponding to disk images in the "/live"
directory. If this file exists, only images listed here will be merged into the
-root unionfs, and they will be loaded in the order listed here. The first entry
-in this file will be the "lowest" point in the unionfs, and the last file in
-this list will be on the "top" of the unionfs, directly below /cow. Without
+root aufs, and they will be loaded in the order listed here. The first entry
+in this file will be the "lowest" point in the aufs, and the last file in
+this list will be on the "top" of the aufs, directly below /cow. Without
this file, any images in the "/live" directory are loaded in alphanumeric order.
See also
internally used on resyncs.
+ -f, --refresh::
+
+try to do the same operation that should be done at reboot or halt, resyncing
+boot-time auto discovered snapshots. Useful to prevent a crash or surge
+power-off.
+
-t, --type **TYPE**::
-Type could be one of "cpio", "squashfs" or "ext2".
+Type could be one of "cpio", "squashfs", "ext2", "ext3" or "jffs2".
-h, --help::
output version information and exit
+Files
+-----
+
+ /etc/live-snapshot.list
+
+This optional file, if present changes the behaviour of live-snapshot, only files and directories listed there are included (integrally) in the snapshot.
+Beware, it is an experimental feature that only works for cpio targets now.
+
See also
--------
usato internamente nelle sincronizzazioni dallo script di init di
live-initramfs. Il formato pu\`o cambiare, usatelo a vostro rischio.
+ -f, --refresh::
+
+scatena la stessa operazione che verrebbe fatta al reboot o all'halt della
+macchina, provando a fare il resync degli snapshot trovati al boot, usabile
+per salvare le modifiche in vista di un crash o di una mancanza di corrente.
+
-t, --type **TYPE**::
il tipo pu`o essere "cpio", "squashfs" o "ext2".
da informazioni sulla versione ed esce
+Files
+-----
+
+ /etc/live-snapshot.list
+
+Facoltativo, se presente cambia completamente il funzionamento di live-snapshot; solo i files e le directory elencate verranno effettivamente inclusi nello snapshot.
+Attenzione, e` una funzionalita` sperimentale che funziona attualmente solo con gli snapshot di tipo "cpio".
+
+
See also
--------
export FETCH
;;
+ hook=*)
+ HOOK="${ARGUMENT#hook=}"
+ export HOOK
+ ;;
+
+ ftpfs=*)
+ FTPFS="${ARGUMENT#ftpfs=}"
+ export FTPFS
+ ;;
+
+ httpfs=*)
+ HTTPFS="${ARGUMENT#httpfs=}"
+ export HTTPFS
+ ;;
+
hostname=*)
HOSTNAME="${ARGUMENT#hostname=}"
LIVECONF="changed"
export LIVE_MEDIA_TIMEOUT
;;
+ language=*|debian-installer/language=*)
+ language=${x#debian-installer/language=}
+ locale="$(lang2locale "$language")"
+ set_locale="true"
+ ;;
+
locale=*|debian-installer/locale=*)
LOCALE="${ARGUMENT#*=}"
export LOCALE
export NOKPERSONALIZER
;;
- nokwallet)
- NOKWALLET="Yes"
- export NOKWALLET
- ;;
-
nolanguageselector)
NOLANGUAGESELECTOR="Yes"
export NOLANGUAGESELECTOR
mount -n -o bind /dev /root/dev
mkdir -p /root/var/run/network
- chroot /root ifup -a
+ chroot /root dhclient eth0
chroot /root wget -P /tmp "${location}"
- chroot /root ifdown -a
+ chroot /root ifconfig eth0 down
umount /root/sys
umount /root/proc
export EXPOSED_ROOT
;;
+ plainroot)
+ PLAIN_ROOT="Yes"
+ export PLAIN_ROOT
+ ;;
+
+ root=*)
+ ROOT="${ARGUMENT#root=}"
+ export ROOT
+ ;;
+
union=*)
UNIONTYPE="${ARGUMENT#union=}"
export UNIONTYPE
export XDEBCONF
;;
+ xdriver=*)
+ XDRIVER="${ARGUMENT#xdriver=}"
+ export XDRIVER
+ ;;
+
xvideomode=*)
XVIDEOMODE="${ARGUMENT#xvideomode=}"
export XVIDEOMODE
if [ -z "${UNIONTYPE}" ]
then
- UNIONTYPE="unionfs"
+ UNIONTYPE="aufs"
export UNIONTYPE
fi
}
if [ -d "${DIRECTORY}"/"${LIVE_MEDIA_PATH}" ]
then
- for FILESYSTEM in squashfs ext2 ext3 xfs dir
+ for FILESYSTEM in squashfs ext2 ext3 xfs dir jffs2
do
if [ "$(echo ${DIRECTORY}/${LIVE_MEDIA_PATH}/*.${FILESYSTEM})" != "${DIRECTORY}/${LIVE_MEDIA_PATH}/*.${FILESYSTEM}" ]
then
path="${1}"
uuid="$(cat /conf/uuid.conf)"
- for try_uuid_file in "${mountpoint}/.disk/casper-uuid"*
+ for try_uuid_file in "${mountpoint}/.disk/live-uuid"*
do
[ -e "${try_uuid_file}" ] || continue
get_backing_device ()
{
case "${1}" in
- *.squashfs|*.ext2|*.ext3)
- echo $(setup_loop "${1}" "loop" "/sys/block/loop*" '0' "${LIVE_MEDIA_ENCRYPTION}")
+ *.squashfs|*.ext2|*.ext3|*.jffs2)
+ echo $(setup_loop "${1}" "loop" "/sys/block/loop*" '0' "${LIVE_MEDIA_ENCRYPTION}" "${2}")
;;
*.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}/*.jffs2" ||
match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.dir"
then
[ -n "${mac}" ] && adddirectory="${directory}/${LIVE_MEDIA_PATH}/${mac}"
return 1
}
-is_supported_fs ()
-{
- # FIXME: do something better like the scan of supported filesystems
- fstype="${1}"
-
- case ${fstype} in
- vfat|iso9660|udf|ext2|ext3|ntfs)
- return 0
- ;;
- esac
-
- return 1
-}
-
copy_live_to ()
{
copyfrom="${1}"
cd "${copyto}"
tar zxf "${copyfrom}/${LIVE_MEDIA_PATH}/$(basename ${FETCH})"
rm -f "${copyfrom}/${LIVE_MEDIA_PATH}/$(basename ${FETCH})"
- mount -r --move "${copyto}" "${rootmnt}"
+ mount -r -o move "${copyto}" "${rootmnt}"
cd "${OLDPWD}"
else
if [ -n "${MODULETORAMFILE}" ]
livefs_root
umount ${copyfrom}
- mount -r --move ${copyto} ${copyfrom}
+ mount -r -o move ${copyto} ${copyfrom}
fi
rmdir ${copyto}
modprobe -q af_packet # For DHCP
- udevtrigger
- udevsettle
+ if [ -x /sbin/udevadm ]
+ then
+ # lenny
+ udevadm trigger
+ udevadm settle
+ else
+ # etch
+ udevtrigger
+ udevsettle
+ fi
ipconfig ${DEVICE} | tee /netboot.config
NFSROOT=${ROOTSERVER}:${ROOTPATH}
fi
- if [ -n "${FETCH}" ] && do_httpmount
+ if ( [ -n "${FETCH}" ] || [ -n "${HTTPFS}" ] || [ -n "${FTPFS}" ] ) && do_httpmount
then
rc=0
return ${rc}
do_httpmount ()
{
rc=1
- extension=$(echo "${FETCH}" | sed 's/\(.*\)\.\(.*\)/\2/')
-
- case "${extension}" in
- squashfs|tgz|tar)
- [ "${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"
- ;;
+ dest="${mountpoint}/${LIVE_MEDIA_PATH}"
+ mount -t ramfs ram "${mountpoint}"
+ mkdir -p "${dest}"
- *)
- [ "${quiet}" != "y" ] && log_begin_msg "Unrecognized archive extension for ${FETCH}"
- esac
+ for webfile in HTTPFS FTPFS FETCH
+ do
+ url="$(eval echo \"\$\{${webfile}\}\")"
+ extension="$(echo "${url}" | sed 's/\(.*\)\.\(.*\)/\2/')"
+
+ if [ -n "$url" ]
+ then
+ case "${extension}" in
+ squashfs|tgz|tar)
+ if [ "${webfile}" = "FETCH" ]
+ then
+ [ "${quiet}" != "y" ] &&
+ log_begin_msg "Trying wget ${url} -O ${dest}/$(basename ${url})"
+ wget "${url}" -O "${dest}/$(basename ${url})"
+ else
+ [ "${quiet}" != "y" ] &&
+ log_begin_msg "Trying to mount ${url} on ${dest}/$(basename ${url})"
+ if [ "${webfile}" = "FTPFS" ]
+ then
+ FUSE_MOUNT="curlftpfs"
+ url="$(dirname ${url})"
+ else
+ FUSE_MOUNT="httpfs"
+ fi
+ modprobe fuse
+ $FUSE_MOUNT "${url}" "${dest}"
+ fi
+ [ ${?} -eq 0 ] && rc=0
+ [ "${extension}" = "tgz" ] && live_dest="ram"
+ break
+ ;;
+
+ *)
+ [ "${quiet}" != "y" ] && log_begin_msg "Unrecognized archive extension for ${url}"
+ ;;
+ esac
+ fi
+ done
+
+ if [ ${rc} != 0 ]
+ then
+ umount "${mountpoint}"
+ fi
return ${rc}
}
snap_label="${1}"
snap_mount="${2}"
snap_type="${3}"
- snapdata=$(find_files "${snap_label}.squashfs ${snap_label}.cpio.gz ${snap_label}.ext2 ${snap_label}.ext3")
+ snapdata=$(find_files "${snap_label}.squashfs ${snap_label}.cpio.gz ${snap_label}.ext2 ${snap_label}.ext3 ${snap_label}.jffs2")
if [ ! -z "${snapdata}" ]
then
snapback="$(echo ${snapdata} | cut -f2 -d ' ')"
snapfile="$(echo ${snapdata} | cut -f3 -d ' ')"
- if echo "${snapfile}" | grep -qs '\(squashfs\|ext2\|ext3\)'
+ if echo "${snapfile}" | grep -qs '\(squashfs\|ext2\|ext3\|jffs2\)'
then
- # squashfs or ext2/ext3 snapshot
+ # squashfs, jffs2 or ext2/ext3 snapshot
dev=$(get_backing_device "${snapback}/${snapfile}")
if ! do_snap_copy "${dev}" "${snap_mount}" "${snap_type}"
fi
else
# cpio.gz snapshot
- if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | cpio -i -u -d 2>/dev/null)
+ if ! (cd "${snap_mount}" && zcat "${snapback}/${snapfile}" | cpio --extract --preserve-modification-time --no-absolute-filenames --sparse --unconditional --make-directories > /dev/null 2>&1)
then
log_warning_msg "Impossible to include the ${snapfile} Snapshot"
return 1
then
# go aroung a bug in nfs-unionfs locking for unionfs <= 1.4
roopt="nfsro"
+ elif [ "${UNIONTYPE}" = "aufs" ]
+ then
+ roopt="rr"
else
roopt="ro"
fi
done
else
# ${MODULE}.module does not exist, create a list of images
- for FILESYSTEM in squashfs ext2 ext3 xfs dir
+ for FILESYSTEM in squashfs ext2 ext3 xfs jffs2 dir
do
for IMAGE in "${image_directory}"/*."${FILESYSTEM}"
do
if [ -n "${addimage_directory}" ] && [ -d "${addimage_directory}" ]
then
- for FILESYSTEM in squashfs ext2 ext3 xfs dir
+ for FILESYSTEM in squashfs ext2 ext3 xfs jffs2 dir
do
for IMAGE in "${addimage_directory}"/*."${FILESYSTEM}"
do
rofslist="${image} ${rofslist}"
elif [ -f "${image}" ]
then
- backdev=$(get_backing_device "${image}")
+ if /sbin/losetup --help 2>&1 | grep -q -- "-r\b"
+ then
+ backdev=$(get_backing_device "${image}" "-r")
+ else
+ backdev=$(get_backing_device "${image}")
+ fi
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}"
+ echo "debug: Mounting 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
mkdir -p /cow
# Looking for "${root_persistence}" device or file
- if [ -n "${PERSISTENT}" ]
+ if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ]
then
+ # Load USB modules
+ num_block=$(ls -l /sys/block | wc -l)
+ for module in sd_mod uhci-hcd ehci-hcd ohci-hcd usb-storage
+ do
+ modprobe -q -b ${module}
+ done
+
+ if [ -x /sbin/udevadm ]
+ then
+ # lenny
+ udevadm trigger
+ udevadm settle
+ else
+ # etch
+ udevtrigger
+ udevsettle
+ fi
+
+ # For some reason, udevsettle does not block in this scenario,
+ # so we sleep for a little while.
+ #
+ # See https://bugs.launchpad.net/ubuntu/+source/casper/+bug/84591
+ for timeout in 5 4 3 2 1
+ do
+ sleep 1
+
+ if [ $(ls -l /sys/block | wc -l) -gt ${num_block} ]
+ then
+ break
+ fi
+ done
+
cowprobe=$(find_cow_device "${root_persistence}")
if [ -b "${cowprobe}" ]
then
cowdevice=${cowprobe}
cow_fstype=$(get_fstype "${cowprobe}")
+ cow_mountopt="rw,noatime"
else
[ "${quiet}" != "y" ] && log_warning_msg "Unable to find the persistent medium"
cowdevice="tmpfs"
cow_fstype="tmpfs"
+ cow_mountopt="rw,noatime,mode=755"
fi
- elif [ -n "${NFS_COW}" ]
+ elif [ -n "${NFS_COW}" ] && [ -z "${NOPERSISTENT}" ]
then
# check if there are any nfs options
if echo ${NFS_COW}|grep -q ','
[ "${quiet}" != "y" ] && log_begin_msg \
"Trying nfsmount ${nfs_cow_opts} ${cowdevice} /cow"
nfsmount ${nfs_cow_opts} ${cowdevice} /cow || \
- panic "Can not mount ${cowdevice} on /cow"
+ panic "Can not mount ${cowdevice} (n: ${cow_fstype}) on /cow"
else
- mount ${cowdevice} -t ${cow_fstype} -o rw,noatime /cow || \
- panic "Can not mount ${cowdevice} on /cow"
+ mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} /cow || \
+ panic "Can not mount ${cowdevice} (o: ${cow_fstype}) on /cow"
fi
rofscount=$(echo ${rofslist} |wc -w)
mount -t tmpfs tmpfs ${rootmnt}/live
# Adding other custom mounts
- if [ -n "${PERSISTENT}" ]
+ if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ]
then
# directly mount /home
# FIXME: add a custom mounts configurable system
;;
*)
- mount --move "${d}" "${rootmnt}/live/${d##*/}"
+ mount -o move "${d}" "${rootmnt}/live/${d##*/}"
;;
esac
done
# shows cow fs on /cow for use by live-snapshot
mkdir -p "${rootmnt}/live/cow"
- mount -o move /cow "${rootmnt}/live/cow"
+ mount -o move /cow "${rootmnt}/live/cow" || mount -o bind /cow "${rootmnt}/live/cow" || [ "${quiet}" != "y" ] && log_warning_msg "Unable to move or bind /cow to ${rootmnt}/live/cow"
}
check_dev ()
devname=$(sys2dev "${sysdev}")
fi
+ if [ -d "${devname}" ]
+ then
+ mount -o bind "${devname}" $mountpoint || continue
+
+ if is_live_path $mountpoint
+ then
+ echo $mountpoint
+ return 0
+ else
+ umount $mountpoint
+ fi
+ fi
+
if [ -n "${LIVE_MEDIA_OFFSET}" ]
then
loopdevname=$(setup_loop "${devname}" "loop" "/sys/block/loop*" "${LIVE_MEDIA_OFFSET}" '')
fi
# or do the scan of block devices
- for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram)
+ for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v 'dm-' | grep -v fd )
do
devname=$(sys2dev "${sysblock}")
fstype=$(get_fstype "${devname}")
done
elif [ "${fstype}" = "squashfs" -o \
"${fstype}" = "ext2" -o \
- "${fstype}" = "ext3" ]
+ "${fstype}" = "ext3" -o \
+ "${fstype}" = "jffs2" ]
then
# This is an ugly hack situation, the block device has
# an image directly on it. It's hopefully
return 1
}
-pulsate ()
-{
- if [ -x /sbin/usplash_write ]
- then
- /sbin/usplash_write "PULSATE"
- fi
-}
-
set_usplash_timeout ()
{
if [ -x /sbin/usplash_write ]
mountroot ()
{
+
+ if [ -x /scripts/local-top/cryptroot ]; then
+ /scripts/local-top/cryptroot
+ fi
+
exec 6>&1
exec 7>&2
exec > live.log
exec 2>&1
+ tail -f live.log >&7 &
+ tailpid="${!}"
Arguments
set_usplash_timeout
[ "${quiet}" != "y" ] && log_begin_msg "Running /scripts/live-premount"
- pulsate
run_scripts /scripts/live-premount
[ "${quiet}" != "y" ] && log_end_msg
set_usplash_timeout
- if [ ! -z "${NETBOOT}" ] || [ ! -z "${FETCH}" ]
+ if [ ! -z "${NETBOOT}" ] || [ ! -z "${FETCH}" ] || [ ! -z "${HTTPFS}" ] || [ ! -z "${FTPFS}" ]
then
if do_netmount
then
panic "Unable to find a live file system on the network"
fi
else
- # 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})
+ if [ -n "${PLAIN_ROOT}" ] && [ -n "${ROOT}" ]
+ then
+ # Do a local boot from hd
+ livefs_root=${ROOT}
+ else
+ # 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})
- if [ -n "${livefs_root}" ]
- then
- break
- fi
+ if [ -n "${livefs_root}" ]
+ then
+ break
+ fi
- sleep 1
- done
+ sleep 1
+ done
+ fi
fi
if [ -z "${livefs_root}" ]
maybe_break live-bottom
[ "${quiet}" != "y" ] && log_begin_msg "Running /scripts/live-bottom"
- pulsate
run_scripts /scripts/live-bottom
[ "${quiet}" != "y" ] && log_end_msg
exec 1>&6 6>&-
exec 2>&7 7>&-
+ kill ${tailpid}
cp live.log "${rootmnt}/var/log/"
}
if [ -z "${NOSUDO}" ]
then
- if [ -f /root/etc/sudoers ]
+ if ! grep -q "${USERNAME}" /root/etc/sudoers
then
echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers
continue
fi
+ /lib/udev/vol_id ${device%%[0-9]*} | grep -q "^ID_FS_USAGE=raid" && 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" ]
then
# use rootfs configured locale
locale=$(grep -s 'LANG=' ${grep_file} | sed s/'LANG='// | tr -d '"' )
-else
- grep_file=/root/etc/default/locale
fi
if [ -n "${LOCALE}" ]
if [ -z "${LANG}" ]
then
- log_warning_message "Locale ${locale} is unsupported."
+ log_warning_msg "Locale ${locale} is unsupported."
locale="en_US.UTF-8"
LANG="${locale}"
fi
really_export LANG
- printf 'LANG=%s\n' "${LANG}" > "${grep_file}"
+ printf 'LANG="%s"\n' "${LANG}" >> /root/etc/default/locale
+ printf 'LANG="%s"\n' "${LANG}" >> /root/etc/environment
printf '%s UTF-8\n' "${LANG}" > /root/etc/locale.gen
chroot /root /usr/sbin/locale-gen
fi
-e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=${USERNAME}/" \
-e "s/^#?AutoReLogin=.*\$/AutoReLogin=true/" \
/root/etc/kde3/kdm/kdmrc
+elif [ -f /root/usr/lib/kde4/etc/kde4/kdm/kdmrc ]
+then
+ # Configure KDM-KDE4 autologin
+ sed -i -r -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \
+ -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \
+ -e "s/^#?AutoReLogin=.*\$/AutoReLogin=true/" \
+ /root/usr/lib/kde4/etc/kde4/kdm/kdmrc
fi
log_end_msg
EOF
-udevtrigger
-udevsettle
+if [ -x /sbin/udevadm ]
+then
+ # lenny
+ udevadm trigger
+ udevadm settle
+else
+ # etch
+ udevtrigger
+ udevsettle
+fi
if [ -z "${NETBOOT}" -a -n "${STATICIP}" -a "${STATICIP}" != "frommedia" ]
then
done
fi
- if [ ! -f /root/etc/resolv.conf -a -f /netboot.config ]
+ if [ ! -f /root/etc/resolv.conf ] || [ -z "$(cat /root/etc/resolv.conf)" ]
then
- # create a resolv.conf if it is not present
- cp /netboot.config /root/var/log/netboot.config
+ if [ -f /netboot.config ]
+ then
+ # create a resolv.conf if it is not present or empty
+ cp /netboot.config /root/var/log/netboot.config
- rc_search=$(cat netboot.config | awk '/domain/{print $3}')
- rc_server0=$(cat netboot.config | awk '/dns0/{print $5}')
- rc_server1=$(cat netboot.config | awk '/dns0/{print $8}')
- rc_server0="nameserver ${rc_server0}"
+ rc_search=$(cat netboot.config | awk '/domain/{print $3}')
+ rc_server0=$(cat netboot.config | awk '/dns0/{print $5}')
+ rc_server1=$(cat netboot.config | awk '/dns0/{print $8}')
+ rc_server0="nameserver ${rc_server0}"
- if [ "${rc_server1}" = "0.0.0.0" ]
- then
- rc_server1=""
- else
- rc_server1="nameserver ${rc_server1}"
- fi
+ if [ "${rc_server1}" = "0.0.0.0" ]
+ then
+ rc_server1=""
+ else
+ rc_server1="nameserver ${rc_server1}"
+ fi
cat > /root/etc/resolv.conf << EOF
# /etc/resolv.conf
${rc_server1}
EOF
- cat /root/etc/resolv.conf >> /root/var/log/netboot.config
+ cat /root/etc/resolv.conf >> /root/var/log/netboot.config
+ fi
fi
fi
gct -s -t bool /desktop/gnome/applications/at/visual/startup true
gct -s -t bool /apps/gksu/disable-grab true
- if [ -e /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py ]
+ if type orca > /dev/null 2>&1
then
- sed -i '/^enableSpeech\W/ s/True/False/;/^enableMagnifier/ s/False/True/' /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py
+ mkdir -p /root/home/${USERNAME}/.orca
+ echo "import orca.settings" >> /root/home/${USERNAME}/.orca/user-settings.py
+ echo "orca.settings.enableSpeech = False" >> /root/home/${USERNAME}/.orca/user-settings.py
+ echo "orca.settings.enableMagnifier = True" >> /root/home/${USERNAME}/.orca/user-settings.py
+ chroot /root chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.orca
fi
;;
gct -s -t bool /desktop/gnome/interface/accessibility true
gct -s -t bool /desktop/gnome/applications/at/visual/startup true
gct -s -t bool /apps/gksu/disable-grab true
+ gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
;;
braille=ask)
gct -s -t bool /desktop/gnome/interface/accessibility true
gct -s -t bool /desktop/gnome/applications/at/visual/startup true
gct -s -t bool /apps/gksu/disable-grab true
+ gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
- if [ -e /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py ]
+ if type orca > /dev/null 2>&1
then
- sed -i '/^enableSpeech\W/ s/True/False/;/^enableBraille/ s/False/True/' /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py
+ mkdir -p /root/home/${USERNAME}/.orca
+ echo "import orca.settings" >> /root/home/${USERNAME}/.orca/user-settings.py
+ echo "orca.settings.enableSpeech = False" >> /root/home/${USERNAME}/.orca/user-settings.py
+ echo "orca.settings.enableBraille = True" >> /root/home/${USERNAME}/.orca/user-settings.py
+ chroot /root chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.orca
fi
;;
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
+ sed -i '/^Exec/ s|/usr/bin/gnome-language-selector|& -n|' /root/usr/share/applications/language-selector.desktop
fi
if [ -x /root/usr/bin/fontconfig-voodoo ]
# live-initramfs script
-rm -f /root/etc/xdg/autostart/trackerd.desktop \
- /root/usr/share/autostart/trackerd.desktop
+rm -f /root/etc/xdg/autostart/tracker-applet.desktop \
+ /root/etc/xdg/autostart/trackerd.desktop \
+ /root/usr/share/autostart/trackerd.desktop
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 [ -z "${HOOK}" ]
+then
+ exit 0
+fi
+
+. /scripts/live-functions
+
+log_begin_msg "Executing custom hook script..."
+
+# live-initramfs script
+
+cd /root
+chroot /root wget "${HOOK}"
+
+FILE="$(basename ${HOOK})"
+
+chmod 0755 "${FILE}"
+./"${FILE}"
+rm -f "${FILE}"
+
+log_end_msg
. /scripts/functions
. /live.vars
-log_end_msg ()
-{
- # Override this so we don't call PROGRESS
- if [ -x /sbin/usplash_write ]
- then
- /sbin/usplash_write "SUCCESS ok"
- fi
-
- _log_msg "Done."
-}
-
log_wait_msg ()
{
# Print a message and wait for enter
eval export "${STRING}"="${VALUE}"
}
+
+lang2locale() {
+ langpart="${1%%_*}"
+ if [ "$1" != "C" ]; then
+ # Match the language code with 3rd field in languagelist
+ line=$(grep -v "^#" /root/usr/share/live-initramfs/languagelist | cut -f3,4,5 -d\; | grep -v ';C$' | grep "^$langpart;")
+ if [ -n "$line" ]; then
+ if [ "$(echo "$line" | grep -c '')" -gt 1 ]; then
+ # More than one match; try matching the
+ # country as well.
+ countrypart="${1#*_}"
+ if [ "$countrypart" = "$1" ]; then
+ countryline="$(echo "$line" | head -n1)"
+ echo "${countryline##*;}"
+ return
+ fi
+ countrypart="${countrypart%%[@.]*}"
+ countryline="$(echo "$line" | grep ";$countrypart;" | head -n1 || true)"
+ if [ "$countryline" ]; then
+ echo "${countryline##*;}"
+ return
+ fi
+ fi
+ echo "${line##*;}"
+ fi
+ else
+ echo "C"
+ fi
+}
echo ${r}
}
+is_supported_fs ()
+{
+ # FIXME: do something better like the scan of supported filesystems
+ fstype="${1}"
+
+ case ${fstype} in
+ vfat|iso9660|udf|ext2|ext3|ntfs|jffs2)
+ return 0
+ ;;
+ esac
+
+ return 1
+}
+
get_fstype ()
{
local FSTYPE
local FSSIZE
+ # fstype misreports LUKS devices
+ if is_luks "${1}"
+ then
+ /lib/udev/vol_id -t ${1} 2>/dev/null
+ return
+ fi
+
eval $(fstype < ${1})
if [ "${FSTYPE}" != "unknown" ]
if grep -q "^${device} " /proc/mounts
then
- grep "^${device} " /proc/mounts | read d mountpoint rest
- echo ${mountpoint}
- return 0
+ # return the first found
+ grep "^${device} " /proc/mounts | cut -f2 -d ' '
fi
-
- return 1
}
lastline ()
if [ -z "${mountp}" ]
then
- mountp=$(where_is_mounted "${dev}")
+ mountp="$(where_is_mounted ${dev})"
- if [ "${?}" -gt 0 ]
+ if [ -z "${mountp}" ]
then
mountp="/mnt/tmp_fs_size"
local pattern=${3}
local offset=${4}
local encryption=${5}
+ local readonly=${6}
modprobe -q -b "${module}"
udevsettle
dev=$(sys2dev "${loopdev}")
options=''
+ if [ -n ${readonly} ]
+ then
+ if /sbin/losetup --help 2>&1 | grep -q -- "-r\b"
+ then
+ options="${options} -r"
+ fi
+ fi
+
if [ 0 -lt "${offset}" ]
then
options="${options} -o ${offset}"
do
load_keymap
- echo -n "Enter passphrase for ${fspath}: " >&6
+ echo -n "Enter passphrase for root filesystem: " >&6
read -s passphrase
echo "${passphrase}" > /tmp/passphrase
+ unset passphrase
exec 9</tmp/passphrase
/sbin/losetup ${options} -e "${encryption}" -p 9 "${dev}" "${fspath}"
error=${?}
break
fi
- echo -n "Something went wrong... Retry? [YES/no] " >&6
+ echo
+ echo -n "There was an error decrypting the root filesystem ... Retry? [Y/n] " >&6
read answer
- if [ 'no' = "${answer}" ]
+ if [ "$(echo "${answer}" | cut -b1 | tr A-Z a-z)" = "n" ]
then
unset answer
break
mountp="${2}"
opts="${3}"
- if where_is_mounted ${dev} > /dev/null
+ old_mountp="$(where_is_mounted ${dev})"
+
+ if [ -n "${old_mountp}" ]
then
- mount -o remount,"${opts}" ${dev} $(where_is_mounted ${dev}) || panic "Remounting failed"
- mount -o bind $(where_is_mounted ${dev}) ${mountp} || panic "Cannot bind-mount"
+ mount -o remount,"${opts}" "${dev}" "${old_mountp}" || panic "Remounting ${dev} ${opts} on ${old_mountp} failed"
+ mount -o bind "${old_mountp}" "${mountp}" || panic "Cannot bind-mount ${old_mountp} on ${mountp}"
else
mount -t $(get_fstype "${dev}") -o "${opts}" "${dev}" "${mountp}" || panic "Cannot mount ${dev} on ${mountp}"
fi
pers_label="${1}"
cow_backing="/${pers_label}-backing"
- for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop)
+ for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v fd)
do
for dev in $(subdevices "${sysblock}")
do
then
echo "${devname}"
return
- elif [ "$(get_fstype ${devname})" = "vfat" ]
- then
- # FIXME: all supported block devices should be scanned
- mkdir -p "${cow_backing}"
- try_mount "${devname}" "${cow_backing}" "rw"
-
- if [ -e "${cow_backing}/${pers_label}" ]
- then
- echo $(setup_loop "${cow_backing}/${pers_label}" "loop" "/sys/block/loop*")
- return 0
- else
- umount ${cow_backing}
- fi
fi
+
+ case "$(get_fstype ${devname})" in
+ vfat|ext2|ext3|jffs2)
+ mkdir -p "${cow_backing}"
+ try_mount "${devname}" "${cow_backing}" "rw"
+
+ if [ -f "${cow_backing}/${pers_label}" ]
+ then
+ echo $(setup_loop "${cow_backing}/${pers_label}" "loop" "/sys/block/loop*")
+ return 0
+ else
+ umount ${cow_backing}
+ fi
+ ;;
+ *)
+ ;;
+ esac
done
done
}
filenames="${1}"
snap_backing="/snap-backing"
- for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop)
+ for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v fd)
do
for dev in $(subdevices "${sysblock}")
do
devname=$(sys2dev "${dev}")
devfstype="$(get_fstype ${devname})"
- if [ "${devfstype}" = "vfat" ] || [ "${devfstype}" = "ext2" ] || [ "${devfstype}" = "ext3" ]
+ if is_supported_fs ${devfstype}
then
- # FIXME: all supported block devices should be scanned
mkdir -p "${snap_backing}"
try_mount "${devname}" "${snap_backing}" "ro"
for filename in ${filenames}
- do
- if [ -e "${snap_backing}/${filename}" ]
+ do
+ if [ -f "${snap_backing}/${filename}" ]
then
echo "${devname} ${snap_backing} ${filename}"
return 0
echo ${mac}
}
+
+is_luks()
+{
+ devname="${1}"
+ if [ -x /sbin/cryptsetup ]
+ then
+ /sbin/cryptsetup isLuks "${devname}" 2>/dev/null || ret=${?}
+ return ${ret}
+ else
+ return 1
+ fi
+
+}
--- /dev/null
+#!/bin/sh
+
+#set -e
+
+# initramfs-tools header
+
+PREREQ="udev"
+
+prereqs()
+{
+ echo "${PREREQ}"
+}
+
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# live-initramfs script
+
+# The following modprobe entry is a workaround to live-initramfs not
+# finding the root filesytem.
+#
+# See also:
+# * http://lists.alioth.debian.org/pipermail/debian-live-devel/2007-May/001459.html
+# * http://lists.alioth.debian.org/pipermail/debian-live-devel/2007-June/001517.html
+# * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=363047
+
+modprobe -q ide-generic
+modprobe -q esp