--- /dev/null
+#!/bin/sh
+
+# casper-snapshot - utility to do Debian Live systems snapshots
+#
+# This program mount a /tmpfs under ~/Desktop and save the /cow
+# filesystem in it for reusing in another session.
+#
+# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
+#
+# 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
+#
+# On Debian systems, the complete text of the GNU General Public License
+# can be found in /usr/share/common-licenses/GPL file.
+
+PROGRAM="`basename ${1}`"
+VERSION=0.0.1
+
+# Source casper conf
+if [ -e /etc/casper.conf ]; then
+ . /etc/casper.conf
+else
+ USERNAME=`cat /etc/passwd | grep "999" | cut -f1 -d ':'`
+fi
+
+Header ()
+{
+ echo "${PROGRAM} - utility to do Debian Live snapshots"
+ echo
+ echo "Usage: ${PROGRAM} [-c|--cow DIRECTORY] [-d|--dest DIRECTORY] [-o|--output FILE] [-t|--type TYPE]"
+ echo "Usage: ${PROGRAM} [-h|--help]"
+ echo "Usage: ${PROGRAM} [-u|--usage]"
+ echo "Usage: ${PROGRAM} [-v|--version]"
+}
+
+Usage ()
+{
+ MESSAGE=${1}
+ Header
+ echo
+ echo "Try \"${PROGRAM} --help\" for more information."
+ if [ ! -z "${MESSAGE}" ]; then
+ echo -e "${MESSAGE}"
+ exit 1
+ else
+ exit 0
+ fi
+}
+
+Help ()
+{
+ Header
+ echo
+ echo "Options:"
+ echo " -c, --cow: specifies the copy on write directory (default: /cow)."
+ echo " -d, --destination: specifies the output snapshot directory (default: /home/\$USERNAME/Desktop/casper-snapshot)."
+ echo " -o, --output: specifies the output image file (default: $type dependent)."
+ echo " -t,--type: specifies the snapshot type between \'squashfs\', \'ext2\' or \'cpio\'.gz archive (default: cpio)"
+ exit 0
+}
+
+Version ()
+{
+ echo "${PROGRAM}, version ${VERSION}"
+ echo
+ echo "Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>"
+ 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"
+ echo "the Free Software Foundation; either version 2 of the License, or"
+ echo "(at your option) any later version."
+ echo
+ echo "This program is distributed in the hope that it will be useful,"
+ echo "but WITHOUT ANY WARRANTY; without even the implied warranty of"
+ echo "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
+ echo "GNU General Public License for more details."
+ echo
+ echo "You should have received a copy of the GNU General Public License"
+ echo "along with this program; if not, write to the Free Software"
+ echo "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"
+ echo
+ echo "On Debian systems, the complete text of the GNU General Public License"
+ echo "can be found in /usr/share/common-licenses/GPL file."
+ echo
+ echo "Homepage: <http://live.debian.net/>"
+ exit 0
+}
+
+Do_snapshot ()
+{
+ case "${TYPE}" in
+ squashfs)
+ mksquashfs "${COW}" "${DEST}" || exit 1
+ ;;
+ cpio)
+ (cd "${COW}" && find . | cpio --quiet -o -H newc | gzip -9 > "${DEST}") || exit 1
+ ;;
+ ext2)
+ 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
+}
+
+Lastline()
+{
+ while read lines ; do
+ line=${lines}
+ done
+ echo "${line}"
+}
+
+Base_path ()
+{
+ testpath="${1}"
+ mounts="`awk '{print $2}' /proc/mounts`"
+ testpath="`realpath ${testpath}`"
+
+ while true ; do
+ if echo "${mounts}" | grep -qs "^${testpath}" ; then
+ set -- `echo "${mounts}" | grep "^${testpath}" | Lastline`
+ echo ${1}
+ break
+ else
+ testpath=`dirname $testpath`
+ fi
+ done
+}
+
+Is_same_mount ()
+{
+ dir1="`Base_path ${1}`"
+ dir2="`Base_path ${2}`"
+ if [ "${dir1}" == "${dir2}" ]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+Parse_args ()
+{
+ # Parse command line
+ ARGUMENTS="`getopt --longoptions cow:,destination:,output:,type:,help,usage,version --name=${PROGRAM} --options c:d:o:t:,h,u,v --shell sh -- ${@}`"
+
+ if [ "${?}" != "0" ]; then
+ echo "Terminating." >&2
+ exit 1
+ fi
+
+ eval set -- "${ARGUMENTS}"
+
+ while true; do
+ case "${1}" in
+ -c|--cow)
+ SNAP_COW="${2}"; shift 2 ;;
+ -d|--destination)
+ SNAP_DEST="${2}"; shift 2 ;;
+ -o|--output)
+ SNAP_OUTPUT="${2}"; shift 2 ;;
+ -t|--type)
+ SNAP_TYPE="${2}"; shift 2 ;;
+ -h|--help)
+ Help; shift ;;
+ -u|--usage)
+ Usage ; shift ;;
+ -v|--version)
+ Version; shift ;;
+ --)
+ shift; break ;;
+ *)
+ echo "Internal error."; exit 1 ;;
+ esac
+ done
+}
+
+Defaults ()
+{
+ DEF_COW="/cow"
+
+ # Bad options handling
+ if [ -z "${SNAP_COW}" ]; then
+ COW="${DEF_COW}"
+ else
+ COW="${SNAP_COW}"
+ fi
+ if [ ! -d "${COW}" ]; then
+ Usage "Error: ${COW} is not a directory\nMaybe you booted with \"hide-cow\" as kernel parameter?"
+ fi
+
+ case "${SNAP_TYPE}" in
+ "cpio"|"squashfs"|"ext2")
+ TYPE="${SNAP_TYPE}"
+ ;;
+ "")
+ TYPE="cpio" ;;
+ *)
+ Usage "Error: unrecognized snapshot type"
+ ;;
+ esac
+}
+
+Main ()
+{
+ Parse_args "${@}"
+ Defaults
+ Do_snapshot
+}
+
+Main "${@}"
eject -p -m /live_media >/dev/null 2>&1
# XXX - i18n
- echo -n "Please remove the disc and close the tray (if any) then press ENTER: "
+ echo "Please remove the disc and close the tray (if any) then press ENTER: "
if [ -x /sbin/usplash_write ]; then
- /sbin/usplash_write "TIMEOUT 0"
- /sbin/usplash_write "TEXT Please remove the disc, close the tray (if any)"
- /sbin/usplash_write "TEXT and press ENTER to continue"
+ /sbin/usplash_write "TIMEOUT 86400"
+ /sbin/usplash_write "TEXT-URGENT Please remove the disc, close the tray (if any)"
+ /sbin/usplash_write "TEXT-URGENT and press ENTER to continue"
fi
read x < /dev/console
case "$1" in
start|restart|reload|force-reload|status)
+ [ "$VERBOSE" != no ] && log_end_msg 0
;;
stop)
+ log_begin_msg "Caching reboot files..."
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
esac
;;
*)
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ log_success_msg "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
bin/casper-login sbin
bin/casper-preseed usr/share/casper
bin/casper-reconfigure usr/share/casper
+bin/casper-snapshot sbin
hooks usr/share/initramfs-tools
scripts usr/share/initramfs-tools
debian/manpage/casper.7
+debian/manpage/casper-snapshot.1
+casper (1.71+debian-1) unstable; urgency=low
+
+ * New upstream release.
+ * Added experimental casper-snapshot script and manpage.
+ * Tagged for debtags project.
+
+ -- Marco Amadori <marco.amadori@gmail.com> Thu, 28 Sep 2006 16:04:54 +0200
+
casper (1.68+debian-3) unstable; urgency=low
* Really add casper manpage (Closes: #389867).
-casper (1.69) UNRELEASED; urgency=low
+casper (1.71) edgy; urgency=low
+ * Use TEXT-URGENT in shutdown script to make sure we display the "please
+ remove disc and press enter" text. Malone: #61533
+ * Increase usplash timeout since "TIMEOUT 0" no longer means "spin
+ forever".
+ * Don't move-mount all the squashfs-es into / since that confuses mono
+ (and some other apps too). Malone: #62756
+ * Disable kwallet by default. Malone: #47743
+ * Add -n to language selector to make it not whine about
+ not-fully-installed langpacks. Malone. #37568
+ * Override definition of log_end_msg in casper-functions. Make sure all
+ casper-bottom scripts use this.
+ * Pulsate bar in casper-top and casper-bottom. Malone: #61535
+
+ -- Tollef Fog Heen <tfheen@ubuntu.com> Wed, 4 Oct 2006 09:52:06 +0200
+
+casper (1.70) edgy; urgency=low
+
+ * Check for new file= alias as well as preseed/file= (closes: Malone
+ #63145).
+
+ -- Colin Watson <cjwatson@ubuntu.com> Wed, 4 Oct 2006 08:59:53 +0100
+
+casper (1.69) edgy; urgency=low
+
+ [ Tollef Fog Heen ]
* Use grep -E in scripts/casper. Malone: #57620
+ * Fix syntax error in accessibility script
+
+ [ Colin Watson ]
+ * Run 'sh -n' over everything in build target to avoid future syntax
+ errors.
+ * Fix check for /etc/default/console-setup (closes: Malone #62775).
- -- Tollef Fog Heen <tfheen@ubuntu.com> Mon, 25 Sep 2006 14:54:57 +0200
+ -- Colin Watson <cjwatson@ubuntu.com> Mon, 2 Oct 2006 10:58:19 +0100
casper (1.68) edgy; urgency=low
Conflicts: usplash (<< 0.4-27)
Recommends: live-package
Suggests: dmsetup
+Tag: admin::boot, admin::filesystem, implemented-in::shell, protocol::smb, role::plugin, scope::utility, special::completely-tagged, works-with-format::iso9660
Description: Debian Live initramfs generator
Casper provides an initramfs generator suited for booting a Debian Live systems
from read only media. Useful to build live CDs.
Conflicts: usplash (<< 0.4-27)
Recommends: live-package
Suggests: dmsetup
+Tag: admin::boot, admin::filesystem, implemented-in::shell, protocol::smb, role::plugin, scope::utility, special::completely-tagged, works-with-format::iso9660
Description: Debian Live initramfs generator
Casper provides an initramfs generator suited for booting a Debian Live systems
from read only media. Useful to build live CDs.
Priority: extra
Depends: initramfs-tools (>= 0.40ubuntu11), dmsetup, user-setup, sudo
Conflicts: usplash (<< 0.4-27)
+Tag: admin::boot, admin::filesystem, implemented-in::shell, protocol::smb, role::plugin, scope::utility, special::completely-tagged, works-with-format::iso9660
Description: Run a "live" preinstalled system from read-only media
Package: ubiquity-casper
Conflicts: espresso-casper
Replaces: espresso-casper
Enhances: ubiquity
+Tag: admin::boot, admin::filesystem, implemented-in::shell, protocol::smb, role::plugin, scope::utility, special::completely-tagged, works-with-format::iso9660
Description: Configuration hooks for live installer
This package provides hook scripts for the Ubiquity live installer that
repeat some pieces of configuration done by the live system boot process in
--- /dev/null
+.TH "CASPER-SNAPSHOT" 1 "Thu, 28 Sep 2006" "0.0.1" "User commands"
+
+.SH NAME
+casper-snapshot \- a simple script to ease persistence usage.
+
+.SH SYNOPSIS
+.B casper-snapshot
+.RB [\| \-c \||\| \-\-cow
+.IR DIRECTORY \|]
+.RB [\| \-d \||\| \-\-destination
+.IR DIRECTORY \||\| FILE \|]
+.RB [\| \-o \||\| \-\-output
+.IR FILE \|]
+.RB [\| \-t \||\| \-\-type
+.IR TYPE \|]
+.PP
+.B make-live
+.RB \-h \||\| \-\-help
+.br
+.B make-live
+.RB \-u \||\| \-\-usage
+.br
+.B make-live
+.RB \-v \||\| \-\-version
+
+.SH DESCRIPTION
+Casper-snapshot is a script useful to build the right types of persistent image files supported by casper.
+
+.SH OPTIONS
+.TP
+.BI "\-c, \-\-cow" DIRECTORY
+specifies the input directory to be cloned in the image file.
+This parameters often does not need to be specified as the default of "/cow" for it should be right for most uses, however it could be handy to specify "/home" and type ext2 for the type to prepare an image file suited to be directly mounted by casper as home.
+.TP
+.BI "\-d, \-\-destination" DIRECTORY
+.TP
+.BI "\-o, \-\-output" FILE
+.TP
+.BI "\-t, \-\-type" TYPE
+
+.SH BUGS
+.B casper-snapshot
+Time (and BTS) will tell.
+
+.SH HOMEPAGE
+Debian Live project <http://live.debian.net/>
+
+.SH SEE ALSO
+.BR casper(7)
+
+.SH AUTHOR
+casper-snapshot was written Marco Amadori <marco.amadori@gmail.com>.
+.TP
+This manual page was written by Marco Amadori <marco.amadori@gmail.com>,
+for the Debian project (but may be used by others).
-.TH CASPER 7 "Mon, 25 Sep 2006" "1.68" "Initramfs-tools hook"
+.TH CASPER 7 "Thu, 28 Sep 2006" "1.69" "Initramfs-tools hook"
.SH NAME
casper \- an hook for initramfs-tools to boot live systems.
As kernel parameter boot prompt.
.SH DESCRIPTION
-Casper is an hook for initramfs-tools used to boot live systems like those created by make-live, this includes the Debian-Live isos, netboot tarballs, and usb stick image and Ubuntu live cds. At boot time it will look for a (often read only) media containing a "/casper" directory where root filesystems (often squashfs compressed) lies and create, using unionfs, a writable environment for debian like systems to boot from.
+Casper is an hook for initramfs-tools used to generate initramfs able to boot live systems like those created by make-live, this includes the Debian-Live isos, netboot tarballs, and usb stick image and Ubuntu live cds. At boot time it will look for a (often read-only) media containing a "/casper" directory where root filesystems (often squashfs compressed) lies and create, using unionfs, a writable environment for debian like systems to boot from.
.SH RECOGNIZED BOOT OPTIONS
.TP
+.B casper-getty
+This enable a special serial login shell (experimental).
+.TP
.BI "host=" HOSTNAME " , userfullname=" USERFULLNAME " , username=" USERNAME
Those parameters lets you override values read from the config file.
.TP
-.B casper-getty
-This enable a special serial login shell (experimental).
+.B "showmounts"
+Specifying this will make casper to show on "/" the ro filesystems (mostly compressed) on /casper. This is not enabled by default because could lead to problems by application like "mono" which store binary paths on installation.
.TP
.BI ip= IFACE,ADDRESS,NETMASK,GATEWAY [ :IFACE,ADDRESS,NETMASK,GATEWAY "]*"
Let you specify the name(s) and the options of the interface(s) that should be configured at boot time. Do not specify it if you want to use dhcp (default).
Casper will look for persistent and snapshot partitions or files labeled "casper-rw", "home-rw", "casper-snap*", "home-snap*" and will try to, in order: mount as /cow the first, mount the second in /home, and just copy the contents of the latters in appropriate locations.
.TP
.B toram
-Adding this parameter, casper will try to copy to ram the whole read-only media before mounting the root filesystem(s), it could need a lot of ram, according to the space used by the read only media.
+Adding this parameter, casper will try to copy to ram the whole read-only media before mounting the root filesystem(s), it could need a lot of ram, according to the space used by the read-only media.
.SH FILES
.B /etc/casper.conf
Debian Live project <http://live.debian.net/>
.SH SEE ALSO
-.BR initramfs-tools(8), make-live(8), make-live.conf(8)
+.BR casper-snapshot(1), initramfs-tools(8), make-live(1), make-live.conf(5)
.SH AUTHOR
-casper was written by Tollen Fog Heen <tfheen@canonical.com>, Matt Zimmerman <mdz@canonical.com>, and Marco Amadori <marco.amadori@gmail.com>,
+casper was written by Tollen Fog Heen <tfheen@canonical.com>, Matt Zimmerman <mdz@canonical.com>, and Marco Amadori <marco.amadori@gmail.com>.
.TP
-This manual was written by Marco Amadori <marco.amadori@gmail.com>,
+This manual page was written by Marco Amadori <marco.amadori@gmail.com>,
for the Debian project (but may be used by others).
# Building package
$(MAKE) -C casper-md5check
+ set -e; \
+ for x in bin/* scripts/casper scripts/casper-bottom/* \
+ ubiquity-hooks/*; do \
+ sh -n $$x; \
+ done
touch build-stamp
# integrity check
copy_exec /usr/lib/casper/casper-md5check /bin
+cp /usr/share/initramfs-tools/scripts/casper-functions $DESTDIR/scripts
+
auto_add_modules net
# looking for casper specifics options as kernel parameters
for x in $(cat /proc/cmdline); do
case $x in
- userfullname*)
- export USERFULLNAME=${x#userfullname=}
- export CASPERCONF="changed"
- ;;
- host*)
- export HOST=${x#host=}
- export CASPERCONF="changed"
- ;;
- username*)
- export USERNAME=${x#username=}
- export CASPERCONF="changed"
- ;;
+ userfullname*)
+ export USERFULLNAME=${x#userfullname=}
+ export CASPERCONF="changed"
+ ;;
+ host*)
+ export HOST=${x#host=}
+ export CASPERCONF="changed"
+ ;;
+ username*)
+ export USERNAME=${x#username=}
+ export CASPERCONF="changed"
+ ;;
netboot*)
export NETBOOT=${x#netboot=} ;;
toram)
export TORAM=1 ;;
- hide-cow)
- export HIDECOW=1 ;;
+ showmounts)
+ export SHOWMOUNTS=1 ;;
persistent)
export PERSISTENT=1 ;;
ip*)
- STATICIP=${x#ip=}
+ STATICIP=${x#ip=}
if [ "${STATICIP}" == "" ]; then
STATICIP="frommedia"
fi
size=$(expr ${size} + ${size}/20 ) # Fixme: 5% more to be sure
needed_space=$(expr ${size} * 1024)
freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( cat /proc/meminfo | grep Cached | head -n 1 | awk '/Cached/{print $2}' - ))
-
+
if [ ! ${freespace} -lt ${needed_space} ] ; then
[ "$quiet" != "y" ] && log_begin_msg "Not enough free memory to copy to ram"
[ "$quiet" != "y" ] && log_end_msg
fi
[ "$quiet" != "y" ] && log_begin_msg "Trying netboot from ${NFSROOT}"
-
+
if [ "${NETBOOT}" != "nfs" ] && do_cifsmount ; then
rc=0
elif do_nfsmount ; then
modprobe "${MP_QUIET}" -b unionfs
- # run-init can't deal with this, but we're going to move all of these
- # away before it runs anyway.
- croot="/casper"
+ # run-init can't deal with images in a subdir, but we're going to
+ # move all of these away before it runs anyway. No, we're not,
+ # put them in / since move-mounting them into / breaks mono and
+ # some other apps.
+
+ croot="/"
# Let's just mount the read-only file systems first
rofsstring=""
mount ${cowdevice} -t ${cow_fstype} -o rw /cow || panic "Can not mount $cowdevice on /cow"
- # Look for a snapshot to copy
-
-
mount -t unionfs -o dirs=/cow=rw:$rofsstring unionfs "$rootmnt" || panic "Unionfs mount failed"
- for d in ${rofslist}; do
- mkdir -p "${rootmnt}/casper/${d##*/}"
- case d in
- *.dir) # do nothing # mount -o bind "${d}" "${rootmnt}/casper/${d##*/}"
- ;;
- *) mount -o move "${d}" "${rootmnt}/casper/${d##*/}"
- ;;
- esac
- done
+ # Look for a snapshot to copy
# Adding other custom mounts
if [ ! -z "${PERSISTENT}" ]; then
fi
fi
- if [ -z "${HIDECOW}" ]; then
- mkdir -p "$rootmnt/cow"
- mount -o bind /cow "$rootmnt/cow"
+ if [ ! -z "${SHOWMOUNTS}" ]; then
+ for d in ${rofslist}; do
+ mkdir -p "${rootmnt}/casper/${d##*/}"
+ case d in
+ *.dir) # do nothing # mount -o bind "${d}" "${rootmnt}/casper/${d##*/}"
+ ;;
+ *) mount -o move "${d}" "${rootmnt}/casper/${d##*/}"
+ ;;
+ esac
+ done
fi
+
+ # shows cow fs on /cow for use by casper-snapshot
+ mkdir -p "$rootmnt/cow"
+ mount -o bind /cow "$rootmnt/cow"
}
is_usb_device() {
done
elif [ "${fstype}" = "squashfs" || \
"${fstype}" = "ext2" ]; then
-
+
# This is an ugly hack situation, the block device has
# an image directly on it. It's hopefully
# casper, so take it and run with it.
-
+
ln -s "${devname}" "${devname}.${fstype}"
echo "${devname}.${fstype}"
return
done
}
+pulsate() {
+ if [ -x /sbin/usplash_write ]; then
+ /sbin/usplash_write "PULSATE"
+ fi
+}
+
set_usplash_timeout() {
if [ -x /sbin/usplash_write ]; then
/sbin/usplash_write "TIMEOUT 120"
exec 7>&2
exec > casper.log
exec 2>&1
-
+
set_usplash_timeout
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-premount"
+ pulsate
run_scripts /scripts/casper-premount
[ "$quiet" != "y" ] && log_end_msg
if [ "$?" -gt 0 ]; then
panic "Unable to find a medium containing a live file system"
fi
-
+
if [ ! -z "${TORAM}" ]; then
copy_to_ram "${livefs_root}"
fi
maybe_break casper-bottom
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-bottom"
+ pulsate
run_scripts /scripts/casper-bottom
[ "$quiet" != "y" ] && log_end_msg
PREREQ=""
DESCRIPTION="Moving mount points..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Adding live session user..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
DESCRIPTION="Configuring fstab..."
FSTAB=/root/etc/fstab
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
DESCRIPTION="Setting up swap..."
FSTAB=/root/etc/fstab
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Setting up locales..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Setting up automatic login..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Setting hostname..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Setting up keyboard..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
done
if [ "$cslayout" ] && [ -x /root/bin/setupcon ] && \
- [ -f /etc/default/console-setup ]; then
+ [ -f /root/etc/default/console-setup ]; then
chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"$cslayout\"/" \
/etc/default/console-setup
if [ "$csvariant" ]; then
PREREQ=""
DESCRIPTION="Configuring X..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Configuring gnome-panel-data..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Configuring screensaver..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Preconfiguring /etc/modules..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
DESCRIPTION="Preconfiguring networking..."
IFFILE="/root/etc/network/interfaces"
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Loading preseed file..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs ()
{
preseed/file=*)
location="${x#preseed/file=}"
;;
+ file=*)
+ location="${x#file=}"
+ ;;
*/*=*)
question="${x%%=*}"
value="${x#*=}"
PREREQ=""
DESCRIPTION="Setting up init..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Configuring accessibility options..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Disabling update-notifier..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Configuring power management..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
PREREQ=""
DESCRIPTION="Configuring some drivers..."
-. /scripts/functions
+. /scripts/casper-functions
prereqs()
{
if [ -e /root/etc/default/linux-restricted-modules-common ]; then
echo 'DISABLED_MODULES="fglrx nv"' >> /root/etc/default/linux-restricted-modules-common
fi
+
+log_end_msg
\ No newline at end of file
--- /dev/null
+#! /bin/sh
+
+PREREQ=""
+DESCRIPTION="Disabling kwallet..."
+
+. /scripts/casper-functions
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+log_begin_msg "$DESCRIPTION"
+
+rm -f /root/usr/share/services/kded/kwalletd.desktop
+
+log_end_msg
\ No newline at end of file
--- /dev/null
+#! /bin/sh
+
+PREREQ=""
+DESCRIPTION="Fixing language selector..."
+
+. /scripts/casper-functions
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+log_begin_msg "$DESCRIPTION"
+
+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
+
+fi
+
+log_end_msg
--- /dev/null
+
+. /scripts/functions
+
+# Override this so we don't call PROGRESS
+log_end_msg()
+{
+ if [ -x /sbin/usplash_write ]; then
+ /sbin/usplash_write "SUCCESS ok"
+ fi
+ _log_msg "Done."
+}
+