From 0830968bbf7d0d9742f8fd44d6a5337218e4da98 Mon Sep 17 00:00:00 2001 From: kwindrem <58538395+kwindrem@users.noreply.github.com> Date: Thu, 22 Jul 2021 13:38:10 -0700 Subject: [PATCH] fixed bug that forced an install --- .DS_Store | Bin 6148 -> 8196 bytes CommonResources | 2 - setup | 3 -- setup (original) | 114 +++++++++++++++++++++++++++++++++++++++++++++++ timeStamp | 2 +- 5 files changed, 115 insertions(+), 6 deletions(-) create mode 100755 setup (original) diff --git a/.DS_Store b/.DS_Store index d67787f4c513faac5789abce217a4261d3bde00c..dfd377b5ae6491295d373881dd92b801590d248f 100644 GIT binary patch delta 510 zcmZoMXmOBWU|?W$DortDU;r^WfEYvza8FDWo2aMA$iFdQH}hr%jz7$c**Q2S7O*h# zPv&8fiv8aMRK>!e$B@pD$xxD;@8Xh_lb-}KA>CWSgFW=HBdUA~UipFy!{Frn+ybB; z1_tJY&CM+0jP*(7#RX79PbC%PWEPhg7+hy$VrF4w13HC+n}e4lHaH`{Jh&vWq_o&6 zu_zkE3rH-;a9FfcMgXa;^L4WniQ8SD(j451R*tfDytc@ z4}0k3bF9i>`U|VNG(sAzvn;qMFDE}Q9jK9Uvjm$GsPq z44J!rT28(wqzt7+CUXl5Z?+MZXPlURb}>5#hafXp2ZI1Nkah(*bz|ap=E?jro*;)a QFhM*4@)yJAc%C`T00<{EDgXcg diff --git a/CommonResources b/CommonResources index f36a1f7..e00ea64 100755 --- a/CommonResources +++ b/CommonResources @@ -30,8 +30,6 @@ reinstallParam="reinstall" reinstallScriptsList="/data/reinstallScriptsList" -configFile="/u-boot/config.txt" - # rc local file that calls reinstallMods # use /data/rc.local if some scripts need resources not available at time rcS.local runs rcLocal="/data/rcS.local" diff --git a/setup b/setup index 70fefb0..b76401d 100755 --- a/setup +++ b/setup @@ -97,9 +97,6 @@ if [ $scriptAction == 'NONE' ] ; then *) esac done - - # next step is to install - scriptAction='INSTALL' fi if [ $scriptAction == 'INSTALL' ] ; then diff --git a/setup (original) b/setup (original) new file mode 100755 index 0000000..70fefb0 --- /dev/null +++ b/setup (original) @@ -0,0 +1,114 @@ +#!/bin/bash + +# this script sets up the SetupHelper service +# This service provides automatic and manual updates for Venus modificaiton packages +# + +#### following lines incorporate SetupHelper utilities into this script +# Refer to the SetupHelper ReadMe file for details. + +source "/data/SetupHelper/CommonResources" + +#### end of lines to include SetupHelper + +#### running manually and OK to proceed - prompt for input +if [ $scriptAction == 'NONE' ] ; then + # display innitial message + echo + echo "This package provides support functions and utilities for Venus modificaiton packages" + echo "Packages are automatically reinstalled following a Venus OS update" + echo "Packages may also be automatically updated from GitHub" + echo " or a USB stick" + echo "Prevouslly uninstalled packages can also be installed and configured" + echo " as an option from the menu either from GitHub or from a USB stick" + echo + echo "If internet access is not available, you can manually update/install from a USB stick" + echo "Note: installing from a USB stick disables automatic GitHub updates" + echo + + if [ -f "$setupOptionsDir/optionsSet" ]; then + enableReinstall=true + else + enableReinstall=false + fi + + response='' + fullPrompt=true + while true; do + if $fullPrompt ; then + echo + echo "Available actions:" + echo " Install and activate (i)" + if $enableReinstall ; then + echo " Reinstall (r) based on options provided at last install" + fi + echo " Uninstall (u) and restores all files to stock" + echo " Quit (q) without further action" + echo " Display setup log (s) outputs the last 100 lines of the log" + echo + echo " Enable/disable automatic GitHub package updates (g)" + echo " Manually install packages from GitHub or USB stick (p)" + echo + fullPrompt=false + fi + /bin/echo -n "Choose an action from the list above: " + read response + case $response in + [iI]*) + scriptAction='INSTALL' + break;; + [rR]*) + if $enableReinstall ; then + scriptAction='INSTALL' + break + fi + ;; + [uU]*) + scriptAction='UNINSTALL' + break + ;; + [qQ]*) + exit + ;; + [sS]*) + displayLog $setupLogFile + ;; + [gG]*) + if [ -f "$setupOptionsDir/autoGitHubUpdate" ]; then + echo "Automatic GitHub updates are currently ENABLED" + else + echo "Automatic GitHub updates are currently disabled" + fi + read -p "Enable (e) / Disable (d) / no change(cr)?: " response + if [ ! -z $response ]; then + if [ $response == 'e' ] || [ $response == 'E' ]; then + logMessage "enabling automatic GitHub package updates" + touch "$setupOptionsDir/autoGitHubUpdate" + elif [ $response == 'd' ] || [ $response == 'D' ]; then + logMessage "disabling automatic GitHub package updates" + rm -f "$setupOptionsDir/autoGitHubUpdate" + fi + fi + ;; + [pP]*) + "$scriptDir/packageInstaller" + fullPrompt=true + ;; + *) + esac + done + + # next step is to install + scriptAction='INSTALL' +fi + +if [ $scriptAction == 'INSTALL' ] ; then + installService $packageName +fi + +if [ $scriptAction == 'UNINSTALL' ] ; then + removeService $packageName +fi + +# thats all folks - SCRIPT EXITS INSIDE THE FUNCTION +endScript diff --git a/timeStamp b/timeStamp index b526117..7a3fe0b 100644 --- a/timeStamp +++ b/timeStamp @@ -1 +1 @@ -1624826016 +1626985917