-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed: menu items not being hidden added all logs to Settings backup …
…added optional Venus OS firmware update to blindUninstall
- Loading branch information
Showing
15 changed files
with
159 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ MbPage { | |
showInProgress = true | ||
} | ||
|
||
model: VisualItemModel | ||
model: VisibleItemModel | ||
{ | ||
MbItemText | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v4.32 | ||
v4.33 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,83 @@ | ||
#!/bin/bash | ||
|
||
# this script is part of a "blind UNINSTALL" archive which | ||
# UNINSTALLS AND REMOVES packages | ||
|
||
packageDir=/data/SetupHelper | ||
script="$packageDir/setup" | ||
if [ -e $script ]; then | ||
$script uninstall | ||
rm -r $packageDir | ||
|
||
packageDir=/data/GuiMods | ||
script="$packageDir/setup" | ||
if [ -e $script ]; then | ||
$script uninstall | ||
rm -r $packageDir | ||
|
||
packageDir=/data/GeneratorConnector | ||
script="$packageDir/setup" | ||
if [ -e $script ]; then | ||
$script uninstall deferReboot deferGuiRestart auto | ||
rm -r $packageDir | ||
|
||
packageDir=/data/RpiDisplaySetup | ||
script="$packageDir/setup" | ||
if [ -e $script ]; then | ||
$script uninstall deferReboot deferGuiRestart auto | ||
rm -r $packageDir | ||
|
||
packageDir=/data/RpiGpioSetup | ||
script="$packageDir/setup" | ||
if [ -e $script ]; then | ||
$script uninstall deferReboot deferGuiRestart auto | ||
rm -r $packageDir | ||
|
||
packageDir=/data/ShutDownMonitor | ||
script="$packageDir/setup" | ||
if [ -e $script ]; then | ||
$script uninstall deferReboot deferGuiRestart auto | ||
rm -r $packageDir | ||
|
||
packageDir=/data/VeCanSetup | ||
script="$packageDir/setup" | ||
if [ -e $script ]; then | ||
$script uninstall deferReboot deferGuiRestart auto | ||
rm -r $packageDir | ||
# this script is part of a "blind UNINSTALL" archive which UNINSTALLS all packages | ||
# Packages are not removed but marked so PackageManager does not auto intall later | ||
# | ||
# Venus OS will also be reinstalled if a suitable .swu file is found on removable media | ||
|
||
rm -f /data/rcS.local | ||
# log activity | ||
logMessage () | ||
{ | ||
echo "blindUninstall: $*" | ||
echo "blindUninstall: $*" | tai64n >> "/data/log/SetupHelper" | ||
} | ||
|
||
logMessage "--- starting" | ||
|
||
# check to see if Venus OS will be reinstalled - actuall reinstall will be done later | ||
swCheckOutput=$(/opt/victronenergy/swupdate-scripts/check-updates.sh -offline -force -check) | ||
if (( $? == 0 )); then | ||
reinstallVenusOs=true | ||
swUpdateVersion=$(echo $swCheckOutput | awk '{print $NF}') | ||
else | ||
reinstallVenusOs=false | ||
swUpdateVersion="none" | ||
fi | ||
|
||
packages=$(ls -d /data/*) | ||
for package in $packages; do | ||
if [ ! -f "$package/version" ]; then | ||
continue | ||
fi | ||
packageName=$(basename $package) | ||
# if not reinstalling Venus OS, uninstall package | ||
if ! $reinstallVenusOs ; then | ||
if [ -f /etc/venus/installedVersion-$packageName ]; then | ||
logMessage "uninstalling $packageName" | ||
"$package/setup" uninstall deferReboot deferGuiRestart auto | ||
fi | ||
fi | ||
# make sure PackageManager does not auto install package | ||
if [ ! -f "$package/DO_NOT_AUTO_INSTALL" ]; then | ||
logMessage "preventing future $packageName auto install" | ||
touch "$package/DO_NOT_AUTO_INSTALL" | ||
fi | ||
done | ||
|
||
# insure no packages are reinstalled after boot | ||
if [ -f "/data/reinstallScriptsList" ]; then | ||
logMessage "removing reinstallScriptsList" | ||
rm -f "/data/reinstallScriptsList" | ||
fi | ||
|
||
reboot | ||
# remove all installed flags | ||
ls /etc/venus/installed* &> /dev/null | ||
if (( $? == 0 )); then | ||
logMessage "removing installedVersion file for all packages" | ||
rm -f /etc/venus/installedVersion* | ||
fi | ||
|
||
# reinstall Venus OS - done in background so this script can clean up and exit without disrupting the software update | ||
if $reinstallVenusOs ; then | ||
logMessage "reinstalling Venus OS $swUpdateVersion" | ||
nohup sh -c 'sleep 1; /opt/victronenergy/swupdate-scripts/check-updates.sh -offline -force -update' > /dev/null & | ||
# reboot if not reinstalling Venus OS | ||
else | ||
logMessage "rebooting ..." | ||
nohup sh -c 'sleep 1; reboot' > /dev/null & | ||
fi | ||
|
||
# rename archive on removable media to prevent blindInstall from running again | ||
drives=$(ls /run/media/) | ||
for drive in $drives ; do | ||
archive="/run/media/$drive/venus-data.tar.gz" | ||
if [ -f "$archive" ]; then | ||
logMessage "renaming venus-data.tar.gz so blindUninstall won't run again" | ||
mv $archive "/run/media/$drive/venus-data.UninstallPackages.tar.gz" | ||
fi | ||
done | ||
|
||
logMessage "--- ending" | ||
|
||
# don't run this script again ! | ||
rm -f /data/rcS.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.