diff options
author | James Meyer <james.meyer@operamail.com> | 2012-01-22 16:17:52 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-01-22 16:17:52 (GMT) |
commit | 41271c7d20a9c6d19a58d23c85300b93fc24721a (patch) | |
tree | 96e1d14dcb37071b457faf2b06be28b116265b97 /abs/core/LinHES-config | |
parent | 4be398d0a85b967426525fd9c36ba9bb2595aa67 (diff) | |
download | linhes_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')
-rw-r--r-- | abs/core/LinHES-config/LinHES.install | 48 | ||||
-rw-r--r-- | abs/core/LinHES-config/PKGBUILD | 2 |
2 files changed, 28 insertions, 22 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 diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD index 1c302b2..f9ede11 100644 --- a/abs/core/LinHES-config/PKGBUILD +++ b/abs/core/LinHES-config/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-config pkgver=2.3 -pkgrel=58 +pkgrel=59 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev LinHes-config ) pkgdesc="Install and configure your system" depends=('bc' 'libstatgrab' 'mysql-python' 'expect' 'curl' 'dnsutils' 'parted' |