# integrity check
copy_exec /usr/lib/casper/casper-md5check /bin
+cp /usr/share/initramfs-tools/scripts/casper-functions $DESTDIR/scripts
+
auto_add_modules net
if [ -e /etc/casper.conf ]; then
rootmnt="$2"
modprobe -Qb 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
mkdir -p "${croot}"
mount -t unionfs -o dirs=/cow=rw:$rofsstring unionfs "$rootmnt"
- for d in $(mount -t squashfs | cut -d\ -f 3); do
- mkdir -p "${rootmnt}/casper/${d##*/}"
- mount -o move "${d}" "${rootmnt}/casper/${d##*/}"
- done
+ if grep -q showmounts /proc/cmdline; then
+ for d in $(mount -t squashfs | cut -d\ -f 3); do
+ mkdir -p "${rootmnt}/casper/${d##*/}"
+ mount -o move "${d}" "${rootmnt}/casper/${d##*/}"
+ done
- if grep -q show-cow /proc/cmdline; then
mkdir -p "$rootmnt/cow"
mount -o bind /cow "$rootmnt/cow"
fi
is_usb_device() {
sysfs_path="${1#/sys}"
- if /lib/udev/path_id "${sysfs_path}" | grep -q "ID_PATH=(usb|pci-[^-]*-usb)"; then
+ if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-[^-]*-usb)"; then
return 0
fi
return 1
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"
set_usplash_timeout
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-premount"
+ pulsate
run_scripts /scripts/casper-premount
[ "$quiet" != "y" ] && log_end_msg
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()
{
gct -s -t string /desktop/gnome/peripherals/mouse/cursor_theme whiteglass
kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/
- fi
;;
# Moderate Visual Impairment
access=v2)
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."
+}
+