summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/LinHES.install
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-01-22 16:17:52 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-01-22 16:17:52 (GMT)
commit41271c7d20a9c6d19a58d23c85300b93fc24721a (patch)
tree96e1d14dcb37071b457faf2b06be28b116265b97 /abs/core/LinHES-config/LinHES.install
parent4be398d0a85b967426525fd9c36ba9bb2595aa67 (diff)
downloadlinhes_pkgbuild-41271c7d20a9c6d19a58d23c85300b93fc24721a.zip
linhes_pkgbuild-41271c7d20a9c6d19a58d23c85300b93fc24721a.tar.gz
linhes_pkgbuild-41271c7d20a9c6d19a58d23c85300b93fc24721a.tar.bz2
LinHES-config/system: check for config.xml and if it's not found run mythvantage.py -m hostype to create a new one.
Diffstat (limited to 'abs/core/LinHES-config/LinHES.install')
-rw-r--r--abs/core/LinHES-config/LinHES.install48
1 files changed, 27 insertions, 21 deletions
diff --git a/abs/core/LinHES-config/LinHES.install b/abs/core/LinHES-config/LinHES.install
index 2b2d53c..fb967aa 100644
--- a/abs/core/LinHES-config/LinHES.install
+++ b/abs/core/LinHES-config/LinHES.install
@@ -18,23 +18,23 @@ post_install() {
LINE="mythtv ALL = NOPASSWD:/usr/MythVantage/bin/mythvantage"
LINE1="mythtv ALL = NOPASSWD:/usr/MythVantage/bin/MythVantage"
-for i in "$LINE" "$LINE1"
-do
+ for i in "$LINE" "$LINE1"
+ do
cp /etc/sudoers /etc/sudoers.bak
grep -q "$i" /etc/sudoers
if [ $? != 0 ]
then
- echo "$i" >> /etc/sudoers
- visudo -cf /etc/sudoers
- if [ ! $? = 0 ]
- then
- cp /etc/sudoers.bak /etc/sudoers
- echo $i
- echo "Error adding files"
- exit 1
- fi
+ echo "$i" >> /etc/sudoers
+ visudo -cf /etc/sudoers
+ if [ ! $? = 0 ]
+ then
+ cp /etc/sudoers.bak /etc/sudoers
+ echo $i
+ echo "Error adding files"
+ exit 1
+ fi
fi
-done
+ done
}
@@ -48,20 +48,26 @@ pre_upgrade() {
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
- . /etc/profile
- ps -ef|grep mysqld|grep -v grep
- status=$?
- echo "status $status"
- if [ $status = 0 ]
- then
- restore_default_settings.sh -c load
- fi
+ . /etc/profile
+ ps -ef|grep mysqld|grep -v grep
+ status=$?
+ echo "status $status"
+ if [ $status = 0 ]
+ then
+ restore_default_settings.sh -c load
+ fi
if [ ! -f /etc/blacklist.package ]
then
echo "List of packages to ignore" > /etc/blacklist.package
echo "one package per line" >> /etc/blacklist.package
fi
- cat /etc/LinHES-release > /etc/os_myth_release
+ cat /etc/LinHES-release > /etc/os_myth_release
+
+ if [ ! -f /usr/share/mythtv/config.xml ]
+ then
+ echo "config.xml not found, generating a new one"
+ /usr/MythVantage/bin/systemconfig.py -m hostype
+ fi
}
# arg 1: the old package version