diff --git a/packages/mediacenter/xbmc/init.d/93_xbmc b/packages/mediacenter/xbmc/init.d/93_xbmc index cc18732dc0..a5732968ef 100644 --- a/packages/mediacenter/xbmc/init.d/93_xbmc +++ b/packages/mediacenter/xbmc/init.d/93_xbmc @@ -22,6 +22,35 @@ # # runlevels: openelec +# needed functions + add_omit_pids() { + omit_pids="$omit_pids -o $1" + } + + _shutdown_script () { + SHUTDOWN="/storage/.config/shutdown.sh" + if [ -f $SHUTDOWN ]; then + echo '!!! SHUTDOWN script detected !!!' | logger -t shutdown.sh + cat "$SHUTDOWN" | logger -t shutdown.sh + echo '!!! -End of shutdown script- !!!' | logger -t shutdown.sh + sh $SHUTDOWN + fi + } + + _safe_shutdown () { + _shutdown_script + add_omit_pids $(pidof connmand) + add_omit_pids $(pidof dbus-daemon) + killall5 -15 $omit_pids + for seq in `seq 1 10` ; do + usleep 500000 + clear > /dev/tty1 + killall5 -18 $omit_pids || break + done + sync + umount -a >/dev/null 2>&1 + } + LIRCDEV="/var/run/lirc/lircd" [ -e /var/run/lirc/lircd.irtrans ] && LIRCDEV="/var/run/lirc/lircd.irtrans" XBMC_ARGS="--standalone -fs --lircdev $LIRCDEV" @@ -52,6 +81,7 @@ fi sh $AUTOSTART fi + wait_for_dbus # waiting for Xorg to start @@ -81,25 +111,22 @@ fi case "$RET" in 0) - if [ ! $(pidof console-kit-daemon) ]; then - touch "$LOCKDIR/$LOCKFILE" - _safe_shutdown - poweroff -f - fi + touch "$LOCKDIR/$LOCKFILE" + killall sshd + _safe_shutdown + poweroff -f ;; 64) - if [ ! $(pidof console-kit-daemon) ]; then - touch "$LOCKDIR/$LOCKFILE" - _safe_shutdown - poweroff -f - fi + touch "$LOCKDIR/$LOCKFILE" + killall sshd + _safe_shutdown + poweroff -f ;; 66) - if [ ! $(pidof console-kit-daemon) ]; then - touch "$LOCKDIR/$LOCKFILE" - _safe_shutdown - reboot - fi + touch "$LOCKDIR/$LOCKFILE" + killall sshd + _safe_shutdown + reboot ;; 255) echo "Abnormal Exit. Exited with code $RET" diff --git a/packages/mediacenter/xbmc/install b/packages/mediacenter/xbmc/install index 37bfa71b3b..399c6acdf2 100755 --- a/packages/mediacenter/xbmc/install +++ b/packages/mediacenter/xbmc/install @@ -27,7 +27,6 @@ PYTHON_LIBDIR="`ls -d $INSTALL/usr/lib/python*`" mkdir -p $INSTALL/usr/bin cp $PKG_DIR/scripts/cputemp $INSTALL/usr/bin cp $PKG_DIR/scripts/gputemp $INSTALL/usr/bin - cp $PKG_DIR/scripts/wait_on_xbmc_exit $INSTALL/usr/bin cp $PKG_BUILD/tools/EventClients/Clients/XBMC\ Send/xbmc-send.py $INSTALL/usr/bin/xbmc-send cp $PKG_DIR/scripts/setwakeup.sh $INSTALL/usr/bin diff --git a/packages/mediacenter/xbmc/scripts/wait_on_xbmc_exit b/packages/mediacenter/xbmc/scripts/wait_on_xbmc_exit deleted file mode 100755 index 60efb36402..0000000000 --- a/packages/mediacenter/xbmc/scripts/wait_on_xbmc_exit +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -count=0 - -while [ $(pidof xbmc.bin) -a $count -le 20 ]; do - usleep 250000 - logger -t wait_on_xbmc_exit "### Waiting for XBMC to Exit - $count ###" - count=$((count+1)) -done diff --git a/packages/sysutils/ConsoleKit/build b/packages/sysutils/ConsoleKit/build deleted file mode 100755 index 491df81986..0000000000 --- a/packages/sysutils/ConsoleKit/build +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/bin \ - --sysconfdir=/etc \ - --libexecdir=/usr/lib/ConsoleKit \ - --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --disable-pam-module \ - --disable-docbook-docs \ - -make - -$MAKEINSTALL diff --git a/packages/sysutils/ConsoleKit/init.d/34_ConsoleKit b/packages/sysutils/ConsoleKit/init.d/34_ConsoleKit deleted file mode 100644 index 598862d7e0..0000000000 --- a/packages/sysutils/ConsoleKit/init.d/34_ConsoleKit +++ /dev/null @@ -1,33 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -# start ConsoleKit daemon -# -# runlevels: openelec, textmode - -progress "starting ConsoleKit daemon" - - install -m 755 -d /var/log/ConsoleKit - install -m 755 -d /var/run/ConsoleKit - while true; do - wait_for_dbus - console-kit-daemon --no-daemon &>/dev/null - usleep 500000 - done & diff --git a/packages/sysutils/ConsoleKit/install b/packages/sysutils/ConsoleKit/install deleted file mode 100755 index f0202cf4dd..0000000000 --- a/packages/sysutils/ConsoleKit/install +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/etc/ConsoleKit/run-seat.d -mkdir -p $INSTALL/etc/ConsoleKit/run-session.d -mkdir -p $INSTALL/etc/ConsoleKit/seats.d - cp -P $PKG_BUILD/data/00-primary.seat $INSTALL/etc/ConsoleKit/seats.d - -mkdir -p $INSTALL/etc/dbus-1/system.d - cp -P $PKG_BUILD/data/ConsoleKit.conf $INSTALL/etc/dbus-1/system.d - -mkdir -p $INSTALL/usr/bin - cp -P $PKG_BUILD/tools/ck-log-system-restart $INSTALL/usr/bin - cp -P $PKG_BUILD/tools/ck-log-system-start $INSTALL/usr/bin - cp -P $PKG_BUILD/tools/ck-log-system-stop $INSTALL/usr/bin - cp -P $PKG_BUILD/src/console-kit-daemon $INSTALL/usr/bin - cp -P $PKG_BUILD/tools/.libs/ck-launch-session $INSTALL/usr/bin - cp -P $PKG_BUILD/tools/ck-list-sessions $INSTALL/usr/bin - cp -P $PKG_BUILD/tools/ck-history $INSTALL/usr/bin - -mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/libck-connector/.libs/*.so* $INSTALL/usr/lib - -mkdir -p $INSTALL/usr/lib/ConsoleKit - cp -P $PKG_BUILD/tools/ck-collect-session-info $INSTALL/usr/lib/ConsoleKit - cp -P $PKG_BUILD/tools/ck-get-x11-display-device $INSTALL/usr/lib/ConsoleKit - cp -P $PKG_BUILD/tools/ck-get-x11-server-pid $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_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 - cp -P $PKG_BUILD/src/org.freedesktop.ConsoleKit.Seat.xml $INSTALL/usr/share/dbus-1/interfaces - cp -P $PKG_BUILD/src/org.freedesktop.ConsoleKit.Session.xml $INSTALL/usr/share/dbus-1/interfaces - -mkdir -p $INSTALL/usr/share/dbus-1/system-services - cp -P $PKG_BUILD/data/org.freedesktop.ConsoleKit.service $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/meta b/packages/sysutils/ConsoleKit/meta deleted file mode 100644 index e7cc97427b..0000000000 --- a/packages/sysutils/ConsoleKit/meta +++ /dev/null @@ -1,36 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -PKG_NAME="ConsoleKit" -PKG_VERSION="0.4.5" -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="GPL" -PKG_SITE="http://www.freedesktop.org/wiki/Software/ConsoleKit" -PKG_URL="http://www.freedesktop.org/software/ConsoleKit/dist/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="dbus polkit libX11" -PKG_BUILD_DEPENDS="toolchain dbus dbus-glib polkit libX11" -PKG_PRIORITY="optional" -PKG_SECTION="system" -PKG_SHORTDESC="ConsoleKit: a framework for defining and tracking users, login sessions, and seats." -PKG_LONGDESC="ConsoleKit is a framework for defining and tracking users, login sessions, and seats." -PKG_IS_ADDON="no" - -PKG_AUTORECONF="yes" diff --git a/packages/sysutils/ConsoleKit/patches/ConsoleKit-do-not-spawn-too-much-threads.patch b/packages/sysutils/ConsoleKit/patches/ConsoleKit-do-not-spawn-too-much-threads.patch deleted file mode 100644 index bc0df554d2..0000000000 --- a/packages/sysutils/ConsoleKit/patches/ConsoleKit-do-not-spawn-too-much-threads.patch +++ /dev/null @@ -1,25 +0,0 @@ -From e8d8a3dadcaa32eeb9f2f27f9774e52e5ec70dde Mon Sep 17 00:00:00 2001 -From: Stefan Saraev -Date: Sat, 8 Jun 2013 22:21:41 +0300 -Subject: [PATCH] do not spawn too much threads - ---- - src/ck-sysdeps-linux.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/ck-sysdeps-linux.c b/src/ck-sysdeps-linux.c -index a95272e..264fe22 100644 ---- a/src/ck-sysdeps-linux.c -+++ b/src/ck-sysdeps-linux.c -@@ -687,7 +687,7 @@ gboolean - ck_get_max_num_consoles (guint *num) - { - if (num != NULL) { -- *num = MAX_NR_CONSOLES; -+ *num = 1; - } - - return TRUE; --- -1.7.2.5 - diff --git a/packages/sysutils/ConsoleKit/scripts/ck-system-restart b/packages/sysutils/ConsoleKit/scripts/ck-system-restart deleted file mode 100755 index ff2001be08..0000000000 --- a/packages/sysutils/ConsoleKit/scripts/ck-system-restart +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. /etc/profile.d/safe-shutdown.conf - -LOCKDIR="/var/lock/" -LOCKFILE="xbmc.disabled" -touch "$LOCKDIR/$LOCKFILE" -wait_on_xbmc_exit -killall sshd -_safe_shutdown -reboot diff --git a/packages/sysutils/ConsoleKit/scripts/ck-system-stop b/packages/sysutils/ConsoleKit/scripts/ck-system-stop deleted file mode 100755 index d729536d6c..0000000000 --- a/packages/sysutils/ConsoleKit/scripts/ck-system-stop +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. /etc/profile.d/safe-shutdown.conf - -LOCKDIR="/var/lock/" -LOCKFILE="xbmc.disabled" -touch "$LOCKDIR/$LOCKFILE" -wait_on_xbmc_exit -killall sshd -_safe_shutdown -poweroff diff --git a/packages/sysutils/busybox/profile.d/01-safe-shutdown.conf b/packages/sysutils/busybox/profile.d/01-safe-shutdown.conf deleted file mode 100644 index 71214d9187..0000000000 --- a/packages/sysutils/busybox/profile.d/01-safe-shutdown.conf +++ /dev/null @@ -1,52 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ -# Core (PATH) environment variables. -# -# This file contains non-OpenELEC evironment variables as well as OpenELEC -# evironment variables that are not user defined. -################################################################################ - - add_omit_pids() { - omit_pids="$omit_pids -o $1" - } - - _shutdown_script () { - SHUTDOWN="/storage/.config/shutdown.sh" - if [ -f $SHUTDOWN ]; then - echo '!!! SHUTDOWN script detected !!!' | logger -t shutdown.sh - cat "$SHUTDOWN" | logger -t shutdown.sh - echo '!!! -End of shutdown script- !!!' | logger -t shutdown.sh - sh $SHUTDOWN - fi - } - - _safe_shutdown () { - _shutdown_script - add_omit_pids $(pidof connmand) - add_omit_pids $(pidof dbus-daemon) - killall5 -15 $omit_pids - for seq in `seq 1 10` ; do - usleep 500000 - clear > /dev/tty1 - killall5 -18 $omit_pids || break - done - sync - umount -a >/dev/null 2>&1 - } diff --git a/scripts/image b/scripts/image index 3fd8aa9cec..f1b62b31bf 100755 --- a/scripts/image +++ b/scripts/image @@ -124,7 +124,6 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION" # Powermanagement support [ "$UPOWER" = "yes" ] && $SCRIPTS/install upower - [ "$UPOWER" = "yes" ] && $SCRIPTS/install ConsoleKit # NTFS 3G support [ "$EXFAT" = "yes" ] && $SCRIPTS/install fuse-exfat