summaryrefslogtreecommitdiffstats
path: root/move/tree/mdk_totem
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-11-06 22:56:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-11-06 22:56:50 +0000
commit3684929676de81c6eabd9d5333f557834efba33f (patch)
tree89c287af8b4b876acec1e819b95649f0d4e0b90d /move/tree/mdk_totem
parentb64692ddd130c43f3b0ba9665bb3945bc46ff485 (diff)
downloaddrakx-backup-do-not-use-3684929676de81c6eabd9d5333f557834efba33f.tar
drakx-backup-do-not-use-3684929676de81c6eabd9d5333f557834efba33f.tar.gz
drakx-backup-do-not-use-3684929676de81c6eabd9d5333f557834efba33f.tar.bz2
drakx-backup-do-not-use-3684929676de81c6eabd9d5333f557834efba33f.tar.xz
drakx-backup-do-not-use-3684929676de81c6eabd9d5333f557834efba33f.zip
- various fixes (including adding /bin/sleep to totem.list and using it)
- mdk_totem is now written in perl
Diffstat (limited to 'move/tree/mdk_totem')
-rwxr-xr-xmove/tree/mdk_totem20
1 files changed, 9 insertions, 11 deletions
diff --git a/move/tree/mdk_totem b/move/tree/mdk_totem
index 857089a1c..f340c6303 100755
--- a/move/tree/mdk_totem
+++ b/move/tree/mdk_totem
@@ -1,14 +1,12 @@
-#!/bin/sh -x
+#!/usr/bin/perl
-# kill 15, fuzzy_pidofs(qr/\bkded\b/);
-# kdesud
+system('mdk_move_loop', 'to_memory', 'always', 'totem');
-# done ASAP since it needs to be done and will speed up totem launch
-mdk_move_loop to_memory always totem
+my $totem_pid = $$;
-cp -a /image_raw/{totem,mdk_behind_totem} /tmp
-
-sudo /tmp/mdk_behind_totem --totem-pid $$ &
-export MDKMOVE=$!
-
-exec /tmp/totem "$@"
+if (my $pid = fork()) {
+ $ENV{MDKMOVE} = $pid;
+ exec 'totem';
+} else {
+ exec 'sudo', 'mdk_behind_totem', '--totem-pid', $totem_pid;
+}