Skip to content

Commit

Permalink
[New] Backup before Wi-Fi recover
Browse files Browse the repository at this point in the history
 Changes to be committed:
	modified:   src/static/static/home/yi-hack-v5/script/configure_wifi.sh
  • Loading branch information
alienatedsec committed Aug 24, 2023
1 parent 4d70c2b commit 25db09f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/static/static/home/yi-hack-v5/script/configure_wifi.sh
Expand Up @@ -8,9 +8,11 @@ function print_help {
}

if [ -f "/tmp/sd/recover/mtdblock2_recover.bin" ]; then
dd if=/tmp/sd/recover/mtdblock2_recover.bin of=/dev/mtdblock2 2>/dev/null
mv /tmp/sd/recover/mtdblock2_recover.bin /tmp/sd/recover/mtdblock2_recover_done.bin
reboot
DATE=$(date '+%Y%m%d%H%M%S')
dd if=/dev/mtdblock2 of=/tmp/sd/recover/mtdblock2_prerecover_$DATE.bin 2>/dev/null
dd if=/tmp/sd/recover/mtdblock2_recover.bin of=/dev/mtdblock2 2>/dev/null
mv /tmp/sd/recover/mtdblock2_recover.bin /tmp/sd/recover/mtdblock2_recover_done.bin
reboot
fi

CFG_FILE=/tmp/configure_wifi.cfg
Expand Down

0 comments on commit 25db09f

Please sign in to comment.