usr/bin: Fix bad if statement in UPDATE_FIRMWARE

fix_package_url
Marc 2021-08-17 23:07:41 +01:00
parent ed8d755436
commit fece2024ae
No known key found for this signature in database
GPG Key ID: 0657563F705ACAAE
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ execute_upgrade() {
# Check battery state first
$LOG "Checking device power state"
battery_state=$(/usr/bin/BATTERY)
if [ "${battery_state}" = "discharging" && -f "/etc/shark/cable" ]; 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