diff --git a/packages/mediacenter/xbmc/init.d/60_setup-xbmc b/packages/mediacenter/xbmc/init.d/60_setup-xbmc index 3a060408eb..46252df5df 100755 --- a/packages/mediacenter/xbmc/init.d/60_setup-xbmc +++ b/packages/mediacenter/xbmc/init.d/60_setup-xbmc @@ -46,6 +46,8 @@ amdGpuType=$(lspci -nn | grep 'VGA' | grep 1002) cat > $HOME/.xbmc/userdata/advancedsettings.xml << EOF true + cputemp + gputemp EOF fi diff --git a/packages/mediacenter/xbmc/install b/packages/mediacenter/xbmc/install index 2e493f49a6..9b35b61860 100755 --- a/packages/mediacenter/xbmc/install +++ b/packages/mediacenter/xbmc/install @@ -5,7 +5,7 @@ PYTHON_LIBDIR="`ls -d $INSTALL/usr/lib/python*`" mkdir -p $INSTALL/usr/bin - cp $PKG_DIR/scripts/xbmc $INSTALL/usr/bin + cp $PKG_DIR/scripts/* $INSTALL/usr/bin cp $PKG_BUILD/tools/EventClients/Clients/XBMC\ Send/xbmc-send.py $INSTALL/usr/bin/xbmc-send mkdir -p $INSTALL/usr/lib/xbmc diff --git a/packages/mediacenter/xbmc/scripts/cputemp b/packages/mediacenter/xbmc/scripts/cputemp new file mode 100755 index 0000000000..20a7194e67 --- /dev/null +++ b/packages/mediacenter/xbmc/scripts/cputemp @@ -0,0 +1,31 @@ +#!/bin/sh + +################################################################################ +# Copyright (C) 2009-2010 OpenELEC.tv +# http://www.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, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +TEMP="0" + +if [ -f /sys/class/thermal/thermal_zone0/temp ]; then + TEMP=`echo "$(cat /sys/class/thermal/thermal_zone0/temp)/1000" |bc` +elif [ -f /usr/bin/sensors ]; then + TEMP=`/usr/bin/sensors -u | head -6 |grep "temp1_input"| awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}'` +fi + +echo "${TEMP} C" diff --git a/packages/mediacenter/xbmc/scripts/gputemp b/packages/mediacenter/xbmc/scripts/gputemp new file mode 100755 index 0000000000..accc4f023a --- /dev/null +++ b/packages/mediacenter/xbmc/scripts/gputemp @@ -0,0 +1,29 @@ +#!/bin/sh + +################################################################################ +# Copyright (C) 2009-2010 OpenELEC.tv +# http://www.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, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +TEMP="0" + +if lspci -n | grep 0300 | grep -q 10de; then + [ -f /usr/bin/nvidia-smi ] && TEMP=`/usr/bin/nvidia-smi -a | grep 'Temperature' | awk '{print $3}'` +fi + +echo "${TEMP} C"