Skip to content

Commit

Permalink
fixed bug that forced an install
Browse files Browse the repository at this point in the history
  • Loading branch information
kwindrem committed Jul 22, 2021
1 parent 3465d68 commit 0830968
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 6 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 0 additions & 2 deletions CommonResources
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ if [ $scriptAction == 'NONE' ] ; then
*)
esac
done

# next step is to install
scriptAction='INSTALL'
fi

if [ $scriptAction == 'INSTALL' ] ; then
Expand Down
114 changes: 114 additions & 0 deletions setup (original)
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion timeStamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1624826016
1626985917

0 comments on commit 0830968

Please sign in to comment.