summaryrefslogtreecommitdiffstats
path: root/move/tree/halt_reboot
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-11-26 16:46:26 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-11-26 16:46:26 +0000
commit023504a1a6d43414f366562485d14dcbdffbedc8 (patch)
treeb2b766daa41f94683e2d81c2b9cad576c7f804ae /move/tree/halt_reboot
parent0088de274228b3a7d55b64481a6dbdb54b8e4279 (diff)
downloaddrakx-023504a1a6d43414f366562485d14dcbdffbedc8.tar
drakx-023504a1a6d43414f366562485d14dcbdffbedc8.tar.gz
drakx-023504a1a6d43414f366562485d14dcbdffbedc8.tar.bz2
drakx-023504a1a6d43414f366562485d14dcbdffbedc8.tar.xz
drakx-023504a1a6d43414f366562485d14dcbdffbedc8.zip
allow to reboot the machine
Diffstat (limited to 'move/tree/halt_reboot')
-rwxr-xr-xmove/tree/halt_reboot10
1 files changed, 10 insertions, 0 deletions
diff --git a/move/tree/halt_reboot b/move/tree/halt_reboot
new file mode 100755
index 000000000..d31032fe6
--- /dev/null
+++ b/move/tree/halt_reboot
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+sudo killall -USR1 startkde_move
+
+if [ $UID == 0 ]; then
+ user=`getent passwd 501 | perl -ne 'print $1 if /([^:]+):/'`
+ su $user -c 'dcop kdesktop default logout'
+else
+ dcop kdesktop default logout
+fi \ No newline at end of file