Skip to content

Commit

Permalink
F_FLASHPART: on error show upload log button
Browse files Browse the repository at this point in the history
related to issue #17
  • Loading branch information
steadfasterX committed Jul 30, 2018
1 parent 1b82ace commit 3c1a607
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions salt.func
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ F_FLASHPART(){ F_LOG "$FUNCNAME: started"
else
F_LOG "$FUNCNAME: $FPART FAILED with $FLASHERR"
echo "# $FPART: FAILED"
F_ERR $FUNCNAME 4 "\n ERROR!\n\n DO NOT REBOOT YOUR DEVICE!\n FLASHING PROBLEM OCCURED!!!\n while flashing:\n\n <b>$FPART</b>"
F_ERR $FUNCNAME 4 "DO NOT REBOOT YOUR DEVICE!\n FLASHING PROBLEM OCCURED!!!\n while flashing:\n\n <b>$FPART</b>\n\nClick this button, then Upload: " 0 "--form --field=Upload-SALT-log!$SICONS/log_16x16.png:FBTN $SALTPATH/getlog"
fi
done | $FYAD --image="$SICONS/salt_logo_64x64.png" --title="$YTITLE - FLASHING" --text="\n <b>Lean back, take a cup of coffee or sleep a bit. SALT is flashing now ...</b>\n (DO NOT REBOOT THE DEVICE while flashing or when an error occurs!)\n\n" --width 900 --progress --button='Close (WAIT until all is flashed)':1
FLERR=${PIPESTATUS[0]}
Expand All @@ -836,10 +836,13 @@ F_FLASHPART(){ F_LOG "$FUNCNAME: started"
if [ "$FLERR" -eq 0 ];then
F_MSGOK 400 "Flashing was successful!"
else
F_MSGE 400 "FLASHING ENDED WITH ERROR: $FLERR\n\nCheck Debug Log in SALT main screen!\nDO NOT REBOOT THE DEVICE TO AVOID HARD BRICK!!!!"
F_MSGE 800 "FLASHING ENDED WITH ERROR: $FLERR\n\nCheck Debug Log in SALT main screen!\nDO NOT REBOOT THE DEVICE TO AVOID HARD BRICK!!!!\n\nIf you haven't already uploaded the debug log click this button, then Upload:\n" "--form --field=Upload-SALT-log!$SICONS/log_16x16.png:FBTN $SALTPATH/getlog"
fi

# TODO: md5 verify?

# wipe cache
# disabled as it will clear the partition but not format it - leading into a non booting device until formatted manually
#F_WIPEPART cache ni || F_MSGE 400 "Wiping cache ended with an error: $WIPERR\n\nCheck Debug Log in SALT main screen."

# sync filesystems
Expand Down
2 changes: 1 addition & 1 deletion salt.vars
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export TRBIN="/bin/tr"

## salt basic stuff
export LC_ALL=C
export VDIG="3.17-7"
export VDIG="3.17-8"
export TNAME="SALT"
export TFULLNAME="$TNAME - [S]teadfasterX [A]ll-in-one [L]G [T]ool"
export PYTHONUNBUFFERED=1
Expand Down

0 comments on commit 3c1a607

Please sign in to comment.