Bump to revision 4
making use of extended functionality of addConf and exep
This commit is contained in:
14
seqs/kodi.sh
14
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
|
||||
|
@@ -187,5 +187,5 @@ readDatabaseInfos() {
|
||||
fi
|
||||
}
|
||||
|
||||
VERSION_SEQREV=3
|
||||
VERSION_SEQREV=4
|
||||
. sequencer.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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user