summaryrefslogtreecommitdiffstats
path: root/abs/core/lirc/lirc.install
diff options
context:
space:
mode:
authorMichael Hanson <hansonorders@verizon.net>2011-08-03 01:33:41 (GMT)
committerMichael Hanson <hansonorders@verizon.net>2011-08-03 01:33:41 (GMT)
commitfd6ce7a9788aeb0800a18cf5b99e615c90d16677 (patch)
treee4c3f2cf38629bea0c22ea42665d43dbd39e61b1 /abs/core/lirc/lirc.install
parentdc4ebdfd07818a200009fa2b638698e47a9ed557 (diff)
downloadlinhes_pkgbuild-fd6ce7a9788aeb0800a18cf5b99e615c90d16677.zip
linhes_pkgbuild-fd6ce7a9788aeb0800a18cf5b99e615c90d16677.tar.gz
linhes_pkgbuild-fd6ce7a9788aeb0800a18cf5b99e615c90d16677.tar.bz2
lirc: Add upgrade logic to change LircSocket to /var/run/lirc/lircd. Closes #745
Diffstat (limited to 'abs/core/lirc/lirc.install')
-rw-r--r--abs/core/lirc/lirc.install18
1 files changed, 18 insertions, 0 deletions
diff --git a/abs/core/lirc/lirc.install b/abs/core/lirc/lirc.install
index 814312e..1f8fd7c 100644
--- a/abs/core/lirc/lirc.install
+++ b/abs/core/lirc/lirc.install
@@ -8,6 +8,24 @@ post_install() {
post_upgrade() {
post_install
+
+ . /etc/systemconfig
+
+ # Fix LircSocket in mythtv database
+ SOCKET=`mysql -u mythtv -pmythtv -B --skip-column-names -h "${dbhost}" -D mythconverg -e \
+ "SELECT data FROM settings WHERE value = 'LircSocket' AND hostname = '${hostname}';"`
+ if [ "${SOCKET}" != "/var/run/lirc/lircd" ]; then
+ mysql -u mythtv -pmythtv -B --skip-column-names -h "${dbhost}" -D mythconverg -e \
+ "UPDATE settings SET data = '/var/run/lirc/lircd' WHERE hostname = '${hostname}';"
+ else
+ echo ">>>"
+ echo ">>> ATTENTION! ATTENTION! ATTENTION!"
+ echo ">>> Unable to connect the the MySQL database to make needed"
+ echo ">>> changes to the LIRC socket."
+ echo ">>> LIRC now uses /var/run/lirc/lircd and /dev/lirc is now"
+ echo ">>> obsolete. Update your MythTV settings to reflect this."
+ echo ">>>"
+ fi
}
# arg 1: the old package version