From 8a93e182abe53eb3ead1f65f3706d6d5c6542d9c Mon Sep 17 00:00:00 2001
From: Cecil Hugh Watson <knoppmyth@gmail.com>
Date: Sun, 22 Mar 2009 16:27:27 -0700
Subject: Appends heartbeat-cmd="xscreensaver-command -deactivate &" to
 /home/mythtv/.mplayer/config

---
 .../xscreensaver/xscreensaver.install              | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 abs/extra-testing/xscreensaver/xscreensaver.install

diff --git a/abs/extra-testing/xscreensaver/xscreensaver.install b/abs/extra-testing/xscreensaver/xscreensaver.install
new file mode 100644
index 0000000..a64ab36
--- /dev/null
+++ b/abs/extra-testing/xscreensaver/xscreensaver.install
@@ -0,0 +1,30 @@
+# arg 1:  the new package version
+post_install() {
+	if grep xscreensaver-command /home/mythtv/.mplayer/config
+	then
+		echo "Nothing to do here..."
+	else
+	echo "heartbeat-cmd=\"xscreensaver-command -deactivate &\"" >> /home/mythtv/.mplayer/config
+fi
+}
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_upgrade() {
+	 if grep xscreensaver-command /home/mythtv/.mplayer/config
+         then
+                 echo "Nothing to do here..."
+         else
+         echo "heartbeat-cmd=\"xscreensaver-command -deactivate &\"" >> /home/mythtv/.mplayer/config
+fi
+}
+
+# arg 1:  the old package version
+post_remove() {
+	grep -v xscreensaver /home/mythtv/.mplayer/config > /tmp/mp-config
+	mv /tmp/mp-config /home/mythtv/.mplayer/config
+	chown mythtv.mythtv /home/mythtv/.mplayer/config
+}
+
+op=$1
+shift
+$op $*
-- 
cgit v0.12

