summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config/systemconfig.sh
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-04-03 19:13:40 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-04-03 19:13:40 (GMT)
commitf41e563ed54a49afafbac7d505cf9bd7198512ef (patch)
tree12638e268890c0ce5888649efa3abac3c073597d /abs/core-testing/LinHES-config/systemconfig.sh
parentbf306752625cd343371fb67bff049f5346437ae0 (diff)
downloadlinhes_pkgbuild-f41e563ed54a49afafbac7d505cf9bd7198512ef.zip
linhes_pkgbuild-f41e563ed54a49afafbac7d505cf9bd7198512ef.tar.gz
linhes_pkgbuild-f41e563ed54a49afafbac7d505cf9bd7198512ef.tar.bz2
LinHES-config: Add support for the hearbeat command with mplayer.
/etc/mplayer/mplayer.conf REF FS#269
Diffstat (limited to 'abs/core-testing/LinHES-config/systemconfig.sh')
-rwxr-xr-xabs/core-testing/LinHES-config/systemconfig.sh36
1 files changed, 28 insertions, 8 deletions
diff --git a/abs/core-testing/LinHES-config/systemconfig.sh b/abs/core-testing/LinHES-config/systemconfig.sh
index 5b7d65e..695be64 100755
--- a/abs/core-testing/LinHES-config/systemconfig.sh
+++ b/abs/core-testing/LinHES-config/systemconfig.sh
@@ -996,6 +996,31 @@ function setup_web_auth {
}
+function mplayer_saver_check () {
+ if [ ! -f $BASE/etc/mplayer/mplayer.conf ]
+ then
+ mkdir -p $BASE/etc/mplayer
+ touch $BASE/etc/mplayer/mplayer.conf
+ #cp -f $TEMPLATES/mplayer.conf.template $BASE/etc/mplayer/mplayer.conf
+ fi
+ grep -q stop-xscreensaver $BASE/etc/mplayer/mplayer.conf
+ if [ $? = 0 ]
+ then
+ sed -i "s/^.*stop-xscreensaver.*$/stop-xscreensaver = 1 / g" $BASE/etc/mplayer/mplayer.conf
+ else
+ echo stop-xscreensaver = 1 >> $BASE/etc/mplayer/mplayer.conf
+ fi
+ grep -q heartbeat-cmd $BASE/etc/mplayer/mplayer.conf
+ if [ $? = 0 ]
+ then
+ sed -i '/^.*heartbeat-cmd.*$/d' $BASE/etc/mplayer/mplayer.conf
+ #sed -i "s/^.*heartbeat-cmd.*$/heartbeat-cmd=\"$1\"/ g" $BASE/etc/mplayer/mplayer.conf
+ fi
+ echo "heartbeat-cmd = \"$1\"" >> $BASE/etc/mplayer/mplayer.conf
+}
+
+
+
function killxscreensaver {
xscreensaver-command --exit &
killall xscreensaver &
@@ -1020,7 +1045,7 @@ case x$Screensavertype in
cp -f $TEMPLATES/xscreensaver.template $MYTHHOME/.xscreensaver
fi
#change the idle
- sed -ie "s/^timeout.*$/timeout: 0:$Screensaveridle:00/g" $MYTHHOME/.xscreensaver
+ sed -i "s/^timeout.*$/timeout: 0:$Screensaveridle:00/g" $MYTHHOME/.xscreensaver
#set the mode
case x$Screensavertheme in
@@ -1039,12 +1064,7 @@ case x$Screensavertype in
;;
esac
-
-
-
-
-
-
+ mplayer_saver_check "/usr/bin/xscreensaver-command -deactivate &"
;;
xgscreensaver)
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type bool --set /apps/gnome-screensaver/lock_enabled false
@@ -1064,7 +1084,7 @@ case x$Screensavertype in
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --set --type list --list-type=string /apps/gnome-screensaver/themes [screensavers-$Screensavertheme]
;;
esac
-
+ mplayer_saver_check "/usr/bin/gnome-screensaver-command -p &"
killxscreensaver
;;
xnone) killgscreensaver