summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-11-06 21:33:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-11-06 21:33:17 +0000
commitb64692ddd130c43f3b0ba9665bb3945bc46ff485 (patch)
treedb2f495379ac5d9616940ee764a0e88e38796f17
parent7b45a9b3b0e6afda5f9af72fa264ced22121d9e5 (diff)
downloaddrakx-backup-do-not-use-b64692ddd130c43f3b0ba9665bb3945bc46ff485.tar
drakx-backup-do-not-use-b64692ddd130c43f3b0ba9665bb3945bc46ff485.tar.gz
drakx-backup-do-not-use-b64692ddd130c43f3b0ba9665bb3945bc46ff485.tar.bz2
drakx-backup-do-not-use-b64692ddd130c43f3b0ba9665bb3945bc46ff485.tar.xz
drakx-backup-do-not-use-b64692ddd130c43f3b0ba9665bb3945bc46ff485.zip
add mdk_totem & mdk_behind_totem
-rw-r--r--move/Makefile2
-rwxr-xr-xmove/tree/mdk_behind_totem71
-rwxr-xr-xmove/tree/mdk_totem14
3 files changed, 86 insertions, 1 deletions
diff --git a/move/Makefile b/move/Makefile
index ec5884e98..6d7d0b4d1 100644
--- a/move/Makefile
+++ b/move/Makefile
@@ -53,7 +53,7 @@ install: build
sudo install -m 440 tree/sudoers $(DEST_LIVETREE)/etc
sudo install -m 644 tree/mdk_move_boot_loop.desktop $(DEST_LIVETREE)/usr/share/autostart
- sudo install tree/mdk_move_loop $(DEST_LIVETREE)/usr/bin
+ sudo install tree/{mdk_move_loop,mdk_totem,mdk_behind_totem} $(DEST_LIVETREE)/usr/bin
sudo install -m 644 tree/kdedrc $(DEST_LIVETREE)/usr/share/config
grep ChangeLog $(INSTALL)/CVS/Entries > /tmp/version
diff --git a/move/tree/mdk_behind_totem b/move/tree/mdk_behind_totem
new file mode 100755
index 000000000..11ef2ae22
--- /dev/null
+++ b/move/tree/mdk_behind_totem
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+ok=1
+
+boot_loop=loop0
+main_loop=loop3
+
+while [ -n "$1" ]; do
+ case "$1" in
+ --boot-loop)
+ boot_loop="$1"
+ shift
+ shift
+ ;;
+ --main-loop)
+ main_loop="$2"
+ shift
+ shift
+ ;;
+ --totem-pid)
+ totem_pid="$2"
+ shift
+ shift
+ ;;
+ *)
+ ok=''
+ shift
+ esac
+done
+
+if [ -z "$totem_pid" -o -z "$ok" ]; then
+ printf "Usage: mdk_behind_totem [--boot-loop <loop>] [--main-loop <loop>] --totem-pid <pid>\n"
+ exit 1
+fi
+
+exec 2> /tmp/mdk_behind_totem.log
+
+trap 'umount_cd' USR1
+
+umount_cd() {
+ echo umount_cd
+ busy-files | grep /image/
+ busy-files | grep /image_boot/
+
+ umount /image_boot
+ losetup -d /dev/$boot_loop
+
+ ln -sf /image_always/lib /
+ umount /image
+ /image_always/sbin/losetup -d /dev/$main_loop
+}
+
+mount_cd() {
+ echo mount_cd
+ /image_always/sbin/losetup -r -e gz /image_raw/live_tree.clp /dev/$main_loop
+ /image_always/bin/mount /dev/$main_loop /image
+
+ losetup -r -e gz /image_raw/live_tree_boot.clp /dev/$boot_loop
+ mount /dev/$boot_loop /image_boot
+
+ ln -sf /image/lib /
+
+ mdk_move_loop to_cdrom always totem
+}
+
+while [ -e "/proc/$totem_pid" ]; do
+ echo "waiting..."
+ sleep 1
+done
+
+mount_cd
diff --git a/move/tree/mdk_totem b/move/tree/mdk_totem
new file mode 100755
index 000000000..857089a1c
--- /dev/null
+++ b/move/tree/mdk_totem
@@ -0,0 +1,14 @@
+#!/bin/sh -x
+
+# kill 15, fuzzy_pidofs(qr/\bkded\b/);
+# kdesud
+
+# done ASAP since it needs to be done and will speed up totem launch
+mdk_move_loop to_memory always totem
+
+cp -a /image_raw/{totem,mdk_behind_totem} /tmp
+
+sudo /tmp/mdk_behind_totem --totem-pid $$ &
+export MDKMOVE=$!
+
+exec /tmp/totem "$@"