From ddbc4657f7b6c15d33c9dc371b8b1f3384452bfd Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Mon, 27 May 2019 15:02:38 +0200 Subject: [PATCH] Bump to revision 4 making use of extended functionality of addConf and exep --- seqs/kodi.sh | 14 +++++++------- seqs/mayan-edms.sh | 2 +- seqs/tvheadend.sh | 6 +----- sequencer/sequencer.sh | 4 +++- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/seqs/kodi.sh b/seqs/kodi.sh index 6907708..2cfbadf 100755 --- a/seqs/kodi.sh +++ b/seqs/kodi.sh @@ -25,7 +25,7 @@ step_2() { step_3_info() { echo "Add $toolName user ($toolUser)"; } step_3() { - exe id -u $toolUser >>/dev/null 2>&1 + exep "id -u $toolUser >>/dev/null 2>&1" if [ $? -eq 0 ] ; then echo echo "User $toolUser exists." @@ -90,15 +90,15 @@ step_5() { step_6_info() { echo "Increase raspberry pi GPU memory to 320"; } step_6() { - exe grep -e '^[ ]*gpu_mem' "$bootConfigLoc" >>/dev/null 2>&1 - if [ -f "$bootConfigLoc" ] && [ $? -ne 0 ] ; then + exep "grep -e '^[ ]*gpu_mem' \"$bootConfigLoc\" >>/dev/null 2>&1" + if [ $? -ne 0 ] && [ -f "$bootConfigLoc" ] ; then # attach settings to raspberry boot configuration exe mount -o remount,rw /boot - echo -n "Modifying boot configuration ... " - echo "$bootConfig" >> "$bootConfigLoc" && echo "ok" + addConf -a "$bootConfig" "$bootConfigLoc" exe mount -o remount,ro /boot else - echo "[ERROR] modifying boot configuration. Kodi may not work properly" + # add to missing conf + addConf -m "$bootConfig" "$bootConfigLoc" fi } @@ -127,5 +127,5 @@ step_7() { esac } -VERSION_SEQREV=3 +VERSION_SEQREV=4 . sequencer.sh diff --git a/seqs/mayan-edms.sh b/seqs/mayan-edms.sh index 751db8b..eddcd45 100755 --- a/seqs/mayan-edms.sh +++ b/seqs/mayan-edms.sh @@ -187,5 +187,5 @@ readDatabaseInfos() { fi } -VERSION_SEQREV=3 +VERSION_SEQREV=4 . sequencer.sh diff --git a/seqs/tvheadend.sh b/seqs/tvheadend.sh index 8df0a36..f9d6848 100755 --- a/seqs/tvheadend.sh +++ b/seqs/tvheadend.sh @@ -41,11 +41,7 @@ step_99() { exe apt update && apt install dirmngr exe apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61 - if [ -f "$sourceList" ] ; then - echo "Skipping creating of $sourceList; Already exists" - return - fi - echo "$sourceEntry" > "$sourceList" + addConf -s "$sourceEntry" "$sourceList" exe apt update saveReturn $? endReturn diff --git a/sequencer/sequencer.sh b/sequencer/sequencer.sh index 458cff7..89d75ed 100755 --- a/sequencer/sequencer.sh +++ b/sequencer/sequencer.sh @@ -155,10 +155,12 @@ addConf() { fi echo -e "ok \n[WARN] Existing config saved to ${3}.bck" return 0 + else + echo "nok (backup exists)" fi fi else - echo "nok" + echo "nok (no change requested)" fi # add configuration to missingConf file