diff options
Diffstat (limited to 'abs/core/LinHES-config/LinHES.install')
-rw-r--r-- | abs/core/LinHES-config/LinHES.install | 48 |
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 |