From f51c6c2b8681558f94c9f028a23267808d13964c Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 7 Jun 2011 17:30:00 +0200 Subject: [PATCH] ConsoleKit: add proper shutdown and reboot helper scripts Signed-off-by: Stephan Raue --- packages/sysutils/ConsoleKit/install | 7 ++++--- packages/sysutils/ConsoleKit/scripts/ck-system-restart | 9 +++++++++ packages/sysutils/ConsoleKit/scripts/ck-system-stop | 9 +++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100755 packages/sysutils/ConsoleKit/scripts/ck-system-restart create mode 100755 packages/sysutils/ConsoleKit/scripts/ck-system-stop diff --git a/packages/sysutils/ConsoleKit/install b/packages/sysutils/ConsoleKit/install index f1af2e7fcf..dc6238b008 100755 --- a/packages/sysutils/ConsoleKit/install +++ b/packages/sysutils/ConsoleKit/install @@ -52,8 +52,10 @@ mkdir -p $INSTALL/usr/lib/ConsoleKit mkdir -p $INSTALL/usr/lib/ConsoleKit/run-seat.d mkdir -p $INSTALL/usr/lib/ConsoleKit/run-session.d mkdir -p $INSTALL/usr/lib/ConsoleKit/scripts - cp -P $PKG_BUILD/tools/linux/ck-system-restart $INSTALL/usr/lib/ConsoleKit/scripts - cp -P $PKG_BUILD/tools/linux/ck-system-stop $INSTALL/usr/lib/ConsoleKit/scripts +# cp -P $PKG_BUILD/tools/linux/ck-system-restart $INSTALL/usr/lib/ConsoleKit/scripts +# cp -P $PKG_BUILD/tools/linux/ck-system-stop $INSTALL/usr/lib/ConsoleKit/scripts + cp -P $PKG_DIR/scripts/ck-system-restart $INSTALL/usr/lib/ConsoleKit/scripts + cp -P $PKG_DIR/scripts/ck-system-stop $INSTALL/usr/lib/ConsoleKit/scripts mkdir -p $INSTALL/usr/share/dbus-1/interfaces cp -P $PKG_BUILD/src/org.freedesktop.ConsoleKit.Manager.xml $INSTALL/usr/share/dbus-1/interfaces @@ -65,4 +67,3 @@ mkdir -p $INSTALL/usr/share/dbus-1/system-services mkdir -p $INSTALL/usr/share/polkit-1/actions cp -P $PKG_BUILD/data/org.freedesktop.consolekit.policy $INSTALL/usr/share/polkit-1/actions - diff --git a/packages/sysutils/ConsoleKit/scripts/ck-system-restart b/packages/sysutils/ConsoleKit/scripts/ck-system-restart new file mode 100755 index 0000000000..d8a60faa81 --- /dev/null +++ b/packages/sysutils/ConsoleKit/scripts/ck-system-restart @@ -0,0 +1,9 @@ +#!/bin/sh + +#Try for common tools +if [ -x "/sbin/reboot" ] ; then + /sbin/reboot + exit $? +else + exit 1 +fi diff --git a/packages/sysutils/ConsoleKit/scripts/ck-system-stop b/packages/sysutils/ConsoleKit/scripts/ck-system-stop new file mode 100755 index 0000000000..6b40407703 --- /dev/null +++ b/packages/sysutils/ConsoleKit/scripts/ck-system-stop @@ -0,0 +1,9 @@ +#!/bin/sh + +#Try for common tools +if [ -x "/sbin/poweroff" ] ; then + /sbin/poweroff + exit $? +else + exit 1 +fi