mirror of https://github.com/hak5/shark-files.git
bin: Add cable check to framework updater
parent
5e3b4e3928
commit
b41b65a27c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue