bin: Add cable check to framework updater

fix_package_url
Marc 2021-08-23 19:32:29 +01:00
parent 5e3b4e3928
commit b41b65a27c
No known key found for this signature in database
GPG Key ID: 0657563F705ACAAE
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ execute_upgrade() {
# Check battery state first
$LOG "Checking device power state"
battery_state=$(/usr/bin/BATTERY)
if [ "${battery_state}" = "discharging" ]; then
if [ "${battery_state}" = "discharging" ] && [ ! -f "/etc/shark/cable" ]; then
# Device is not plugged in
$LOG "Device is not powered. Do not attempt firmware upgrade"
return 1