Bump to revision 4

making use of extended functionality of addConf and exep
This commit is contained in:
2019-05-27 15:02:38 +02:00
parent e37f6269ee
commit ddbc4657f7
4 changed files with 12 additions and 14 deletions

View File

@@ -25,7 +25,7 @@ step_2() {
step_3_info() { echo "Add $toolName user ($toolUser)"; } step_3_info() { echo "Add $toolName user ($toolUser)"; }
step_3() { step_3() {
exe id -u $toolUser >>/dev/null 2>&1 exep "id -u $toolUser >>/dev/null 2>&1"
if [ $? -eq 0 ] ; then if [ $? -eq 0 ] ; then
echo echo
echo "User $toolUser exists." echo "User $toolUser exists."
@@ -90,15 +90,15 @@ step_5() {
step_6_info() { echo "Increase raspberry pi GPU memory to 320"; } step_6_info() { echo "Increase raspberry pi GPU memory to 320"; }
step_6() { step_6() {
exe grep -e '^[ ]*gpu_mem' "$bootConfigLoc" >>/dev/null 2>&1 exep "grep -e '^[ ]*gpu_mem' \"$bootConfigLoc\" >>/dev/null 2>&1"
if [ -f "$bootConfigLoc" ] && [ $? -ne 0 ] ; then if [ $? -ne 0 ] && [ -f "$bootConfigLoc" ] ; then
# attach settings to raspberry boot configuration # attach settings to raspberry boot configuration
exe mount -o remount,rw /boot exe mount -o remount,rw /boot
echo -n "Modifying boot configuration ... " addConf -a "$bootConfig" "$bootConfigLoc"
echo "$bootConfig" >> "$bootConfigLoc" && echo "ok"
exe mount -o remount,ro /boot exe mount -o remount,ro /boot
else else
echo "[ERROR] modifying boot configuration. Kodi may not work properly" # add to missing conf
addConf -m "$bootConfig" "$bootConfigLoc"
fi fi
} }
@@ -127,5 +127,5 @@ step_7() {
esac esac
} }
VERSION_SEQREV=3 VERSION_SEQREV=4
. sequencer.sh . sequencer.sh

View File

@@ -187,5 +187,5 @@ readDatabaseInfos() {
fi fi
} }
VERSION_SEQREV=3 VERSION_SEQREV=4
. sequencer.sh . sequencer.sh

View File

@@ -41,11 +41,7 @@ step_99() {
exe apt update && apt install dirmngr exe apt update && apt install dirmngr
exe apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61 exe apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
if [ -f "$sourceList" ] ; then addConf -s "$sourceEntry" "$sourceList"
echo "Skipping creating of $sourceList; Already exists"
return
fi
echo "$sourceEntry" > "$sourceList"
exe apt update exe apt update
saveReturn $? saveReturn $?
endReturn endReturn

View File

@@ -155,10 +155,12 @@ addConf() {
fi fi
echo -e "ok \n[WARN] Existing config saved to ${3}.bck" echo -e "ok \n[WARN] Existing config saved to ${3}.bck"
return 0 return 0
else
echo "nok (backup exists)"
fi fi
fi fi
else else
echo "nok" echo "nok (no change requested)"
fi fi
# add configuration to missingConf file # add configuration to missingConf file