Adding upstream version 1.71+debian. upstream/1.71+debian
authorDaniel Baumann <daniel@debian.org>
Sun, 18 Apr 2010 16:44:52 +0000 (18:44 +0200)
committerDaniel Baumann <daniel@debian.org>
Sun, 18 Apr 2010 16:44:52 +0000 (18:44 +0200)
24 files changed:
hooks/casper
scripts/casper
scripts/casper-bottom/05mountpoints
scripts/casper-bottom/10adduser
scripts/casper-bottom/12fstab
scripts/casper-bottom/13swap
scripts/casper-bottom/14locales
scripts/casper-bottom/15autologin
scripts/casper-bottom/18hostname
scripts/casper-bottom/19keyboard
scripts/casper-bottom/20xconfig
scripts/casper-bottom/22gnome_panel_data
scripts/casper-bottom/22screensaver
scripts/casper-bottom/23etc_modules
scripts/casper-bottom/23networking
scripts/casper-bottom/24preseed
scripts/casper-bottom/25configure_init
scripts/casper-bottom/30accessibility
scripts/casper-bottom/31disable_update_notifier
scripts/casper-bottom/32disable_hibernation
scripts/casper-bottom/33disable_binary_drivers
scripts/casper-bottom/34disable_kwallet [new file with mode: 0755]
scripts/casper-bottom/35fix_language_selector [new file with mode: 0755]
scripts/casper-functions [new file with mode: 0644]

index 7a1bb8c..db1d405 100755 (executable)
@@ -65,6 +65,8 @@ manual_add_modules ohci1394
 # 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
index bb8a7ee..346a6ca 100644 (file)
@@ -189,9 +189,12 @@ setup_unionfs() {
     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}"
@@ -232,12 +235,12 @@ setup_unionfs() {
     
     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
@@ -246,7 +249,7 @@ setup_unionfs() {
 
 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
@@ -294,6 +297,12 @@ find_livefs() {
         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"
@@ -308,6 +317,7 @@ mountroot() {
     
     set_usplash_timeout
     [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-premount"
+    pulsate
     run_scripts /scripts/casper-premount
     [ "$quiet" != "y" ] && log_end_msg
 
@@ -333,6 +343,7 @@ mountroot() {
     maybe_break casper-bottom
     [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-bottom"
 
+    pulsate
     run_scripts /scripts/casper-bottom
     [ "$quiet" != "y" ] && log_end_msg
 
index ca8845a..7c61de3 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Moving mount points..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index 0c6cd4b..f7254e8 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Adding live session user..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index 00e5c50..ac39396 100755 (executable)
@@ -4,7 +4,7 @@ PREREQ=""
 DESCRIPTION="Configuring fstab..."
 FSTAB=/root/etc/fstab
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index 44d73f3..986b079 100755 (executable)
@@ -4,7 +4,7 @@ PREREQ=""
 DESCRIPTION="Setting up swap..."
 FSTAB=/root/etc/fstab
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index ebe7616..f9f76b5 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Setting up locales..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index 5f7797a..81bd3a4 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Setting up automatic login..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index 7ac5b00..19ac61f 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Setting hostname..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index d738faf..1d833ad 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Setting up keyboard..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
@@ -39,7 +39,7 @@ for x in $(cat /proc/cmdline); do
 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
index b8a4552..3916f41 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Configuring X..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index 5509ce1..4dd5d9d 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Configuring gnome-panel-data..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index 6719f5f..d879d8d 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Configuring screensaver..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index 622d96e..754a832 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Preconfiguring /etc/modules..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index fc015b0..4d98798 100755 (executable)
@@ -4,7 +4,7 @@ PREREQ=""
 DESCRIPTION="Preconfiguring networking..."
 IFFILE="/root/etc/network/interfaces"
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index 98a9864..cd52467 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Loading preseed file..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs ()
 {
@@ -26,6 +26,9 @@ for x in $(cat /proc/cmdline); do
                preseed/file=*)
                        location="${x#preseed/file=}"
                        ;;
+               file=*)
+                       location="${x#file=}"
+                       ;;
                */*=*)
                        question="${x%%=*}"
                        value="${x#*=}"
index f457bf6..3578545 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Setting up init..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index b0c049b..cc64832 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Configuring accessibility options..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
@@ -52,7 +52,6 @@ for x in $(cat /proc/cmdline); do
                         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)
index 082b818..10b86a2 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Disabling update-notifier..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index badcef6..47344fa 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Configuring power management..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
index 6bc2279..971ce8e 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Configuring some drivers..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
@@ -23,3 +23,5 @@ log_begin_msg "$DESCRIPTION"
 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
diff --git a/scripts/casper-bottom/34disable_kwallet b/scripts/casper-bottom/34disable_kwallet
new file mode 100755 (executable)
index 0000000..add7cca
--- /dev/null
@@ -0,0 +1,25 @@
+#! /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
diff --git a/scripts/casper-bottom/35fix_language_selector b/scripts/casper-bottom/35fix_language_selector
new file mode 100755 (executable)
index 0000000..96a1d6c
--- /dev/null
@@ -0,0 +1,28 @@
+#! /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
diff --git a/scripts/casper-functions b/scripts/casper-functions
new file mode 100644 (file)
index 0000000..9e36db7
--- /dev/null
@@ -0,0 +1,12 @@
+
+. /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."
+}
+