summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-system')
-rw-r--r--abs/core/LinHES-system/LinHES-system.install12
-rw-r--r--abs/core/LinHES-system/LinHES.install9
-rw-r--r--abs/core/LinHES-system/PKGBUILD11
-rwxr-xr-xabs/core/LinHES-system/misc_status_config.py37
-rwxr-xr-xabs/core/LinHES-system/misc_which_recorder.pl6
-rw-r--r--abs/core/LinHES-system/myth_status.py15
-rwxr-xr-xabs/core/LinHES-system/mythfrontend-start4
7 files changed, 51 insertions, 43 deletions
diff --git a/abs/core/LinHES-system/LinHES-system.install b/abs/core/LinHES-system/LinHES-system.install
deleted file mode 100644
index f2185cd..0000000
--- a/abs/core/LinHES-system/LinHES-system.install
+++ /dev/null
@@ -1,12 +0,0 @@
-## arg 1: the new package version
-post_install() {
- /usr/LH/bin/misc_status_config.py
-}
-
-## arg 1: the new package version
-## arg 2: the old package version
-post_upgrade() {
- /usr/LH/bin/misc_status_config.py
-}
-
-# vim:set ts=2 sw=2 et:
diff --git a/abs/core/LinHES-system/LinHES.install b/abs/core/LinHES-system/LinHES.install
index c9950f2..7ae0616 100644
--- a/abs/core/LinHES-system/LinHES.install
+++ b/abs/core/LinHES-system/LinHES.install
@@ -51,14 +51,9 @@ grep -q "pam_limits.so" /etc/pam.d/su
fi
-# Update mythtv's fluxbox keys files to use the tvterm.sh script to get
-# an xterm. Then signal fluxbox to re-read the keys file.
-
-sed -i.orig 's/^Mod1 x :.*xterm.*$/Mod1 x :ExecCommand tvterm.sh/g' \
- ~mythtv/.fluxbox/keys
-pkill -HUP fluxbox
-
+# Add db entry for misc status in MythWeb
+/usr/LH/bin/misc_status_config.py
}
diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD
index 9a62ccf..eb53138 100644
--- a/abs/core/LinHES-system/PKGBUILD
+++ b/abs/core/LinHES-system/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-system
pkgver=2
-pkgrel=54
+pkgrel=61
arch=('i686')
MVDIR=$startdir/pkg/usr/LH
BINDIR=$startdir/pkg/usr/bin
@@ -8,7 +8,6 @@ install=LinHES.install
pkgdesc="scripts and things related to having an automated system"
depends=(linhes-sounds xdotool fluxbox tilda keylaunch python_aosd 'linhes-scripts>=7-24' 'runit-scripts>=2.1.1-43' 'udisks' 'LinHES-config>=2.3-59')
backup=(etc/modprobe.d/alsa-base)
-install=LinHES-system.install
binfiles="LinHES-start optimize_mythdb.py
myth_mtc.py myth_mtc.sh LinHES-run
firstboot.sh load-modules-mythvantage.sh
@@ -69,9 +68,9 @@ md5sums=('d1a5963c5a440a608031c6d750232633'
'dc3eef2a624754e16805d72bbe488b67'
'dc0be354ce77ba2b89868fc29b942c43'
'542e670e78d117657f93141e9689f54d'
- '48b763dba127aac6ab05c84643f83b71'
+ '41951459ea9d2b0567be521b67e6285a'
'ba351b92e69bcaf26a9bf80417b09c3c'
- '4545eb39213d40b5a2bdeda5e066cdc4'
+ '309638acf596ce3c790aa2bf5c7c9880'
'962a3e9eaba2d1466251b7ab0956705d'
'd03aedeeeda0f5e9c1eb437411c88477'
'94ce8f1d5085c0db7b267db8c2e9a3ff'
@@ -85,10 +84,10 @@ md5sums=('d1a5963c5a440a608031c6d750232633'
'b798ee0796d1b760a2998f90eb8ce9cc'
'4a3cd8f9b33b2b86fdba47a8f1fa2859'
'06a628469051237943b7c874f2e29b8a'
- '0512f859cd5ea1d9eb972840caef2f0e'
+ '54ebcc024db2e0ebe8121305d8926767'
'45f46d1f9193c8dde18e56369ec29a1e'
'a8edbe7bc37e9932e8749d9f5f89c16f'
- '14cea9e87654441b766a97576233ba5a'
+ '116b0f62ed4e8dd6e437930deeb6e49e'
'eb879fee9603a05d5420d4ce8ed9e450'
'f1870a9522c79e6b248fcbf81dec3280'
'84492954db16740f949d795b74383189'
diff --git a/abs/core/LinHES-system/misc_status_config.py b/abs/core/LinHES-system/misc_status_config.py
index 0a0ba6c..cc82534 100755
--- a/abs/core/LinHES-system/misc_status_config.py
+++ b/abs/core/LinHES-system/misc_status_config.py
@@ -7,9 +7,34 @@ from MythTV import MythDB
mythdb = MythDB()
localhostname = gethostname()
-# mythtv-setup
-if mythdb.settings[localhostname].MiscStatusScript == u'':
- mythdb.settings[localhostname].MiscStatusScript = u'/usr/LH/bin/misc_status_info.sh'
- print 'The MythTV database setting MiscStatusScript was updated to /usr/LH/bin/misc_status_info.sh.'
-else:
- print 'The MythTV database setting MiscStatusScript is already set and will not be updated.'
+# Function to set db setting. This setting is set in mythtv-setup.
+def dbSettingChange():
+ if mythdb.settings[localhostname].MiscStatusScript == u'':
+ mythdb.settings[localhostname].MiscStatusScript = u'/usr/LH/bin/misc_status_info.sh'
+ print 'The MythTV database setting MiscStatusScript was updated to /usr/LH/bin/misc_status_info.sh.'
+ else:
+ print 'The MythTV database setting MiscStatusScript is already set and will not be updated.'
+ return
+
+#taken from systemconfig.py
+#this is how you populate the dict
+systemconfig = {}
+file_name = "/etc/systemconfig"
+try:
+ config_file = open(file_name)
+except:
+ logging.critical("%s could not be opened", file_name)
+ sys.exit(1)
+
+for line in config_file:
+ line = line.strip()
+ if line and line[0] is not "#" and line[-1] is not "=":
+ var, val = line.rsplit("=", 1)
+ val = val.strip('"')
+ systemconfig[var.strip()] = val.strip()
+
+#this is how you reference a value from mv_hostype.py
+if (systemconfig.get("SystemType") == "Standalone"):
+ dbSettingChange()
+elif systemconfig.get("SystemType") == "Master_backend":
+ dbSettingChange()
diff --git a/abs/core/LinHES-system/misc_which_recorder.pl b/abs/core/LinHES-system/misc_which_recorder.pl
index f8a1022..6952b3f 100755
--- a/abs/core/LinHES-system/misc_which_recorder.pl
+++ b/abs/core/LinHES-system/misc_which_recorder.pl
@@ -60,7 +60,8 @@ while (<$fh>)
{
# Myth .24 regex to find start of recording
# if (/^(.*)(?:\d(?: I )?|I.* -) (?:Started|Tuning) recording: (.*): channel (\d+) on cardid (\d+), sourceid (\d+)/)
- if (/^(\d+-\d+-\d+T\d+\:\d+\:\d+)(?:.*) (?:Started|Tuning) recording: (.*): channel (\d+) on cardid (\d+), sourceid (\d+)/)
+# Myth .25 regex to find start of recording for digital and analog MPEG
+ if (/^(\d+-\d+-\d+T\d+\:\d+\:\d+)(?:.*) (?:Started|Tuning) recording: (.*): channel (\d+) on cardid (\d+), sourceid (\d+)/ || /^(\d+-\d+-\d+T\d+\:\d+\:\d+)(?:.*) \(UpdateRecStatus\) Updating status for (.*)() on cardid (\d+) \(Will Record => Recording\)()/)
{
if ($mode eq "--noheader")
{
@@ -75,7 +76,8 @@ while (<$fh>)
$index++;
($time, $title, $chanid, $cardid, $sourceid) = ($1, $2, $3, $4, $5);
- $time = `date -d $time +%a' '%m/%d' '%H:%M' '%p`;
+ $time =~ s/T/' '/;
+ $time = `date -d $time +%a' '%m/%d' '%l:%M' '%p`;
chomp ($time);
if (($title =~ /"?(.+)"?:"?(.*)"?/) || ($title =~ /(.+) "(.*)"/))
{
diff --git a/abs/core/LinHES-system/myth_status.py b/abs/core/LinHES-system/myth_status.py
index b4f4375..da43679 100644
--- a/abs/core/LinHES-system/myth_status.py
+++ b/abs/core/LinHES-system/myth_status.py
@@ -92,14 +92,13 @@ print ""
print "Conflicted Recordings:"
print "----------------------"
a=be.getConflictedRecordings()
-try:
- if len(a) == 0:
- print " No conflicts"
- else:
- for i in a:
- title_chan="%s (%s)" %(i.title, i.channame)
- print " %s - %-50s " %(i.starttime,title_chan)
-except:
+c=0
+for i in a:
+ title_chan="%s (%s)" %(i.title, i.channame)
+ print " %s - %-50s " %(i.starttime,title_chan)
+ c=c+1
+
+if c == 0:
print " No conflicts"
print ""
diff --git a/abs/core/LinHES-system/mythfrontend-start b/abs/core/LinHES-system/mythfrontend-start
index 1f48449..5cfc9b7 100755
--- a/abs/core/LinHES-system/mythfrontend-start
+++ b/abs/core/LinHES-system/mythfrontend-start
@@ -19,10 +19,10 @@ then
fi
question="There $diagtext running. Do you really want to start another one?"
- mythvantage -q "${question}"
+ mythvantage -Q "${question}"
if [ $? = 16 ]
then
- $STARTCMD 2>&1
+ $STARTCMD 2>&1
fi
else
$STARTCMD 2>&1