ConsoleKit: add proper shutdown and reboot helper scripts

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-06-07 17:30:00 +02:00
parent b141ffba39
commit f51c6c2b86
3 changed files with 22 additions and 3 deletions

View File

@ -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

View File

@ -0,0 +1,9 @@
#!/bin/sh
#Try for common tools
if [ -x "/sbin/reboot" ] ; then
/sbin/reboot
exit $?
else
exit 1
fi

View File

@ -0,0 +1,9 @@
#!/bin/sh
#Try for common tools
if [ -x "/sbin/poweroff" ] ; then
/sbin/poweroff
exit $?
else
exit 1
fi