OpenWrt – Blame information for rev 4
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
4 | office | 1 | #!/bin/sh |
2 | |||
3 | die() { |
||
4 | echo $1 |
||
5 | exit 1 |
||
6 | } |
||
7 | |||
8 | FRITZBOX='192.168.178.1' |
||
9 | USER='adam2' |
||
10 | PASSWD='adam2' |
||
11 | FILE='uboot-fritz4040.bin' |
||
12 | |||
13 | ping -q -4 -w 1 -c 1 "$FRITZBOX" &> /dev/null || die "Fritzbox at $FRITZBOX is not reachable. aborting" |
||
14 | |||
15 | cat << EOS |
||
16 | |||
17 | This will take ages (2 minutes)! If you want a |
||
18 | status bar: Attach a serial to the device and look there. |
||
19 | |||
20 | Note: If this fails, you need to use AVM\' recover |
||
21 | utility to get your box back. However this step |
||
22 | should not damage your box.... |
||
23 | |||
24 | Also it doesn't terminate.. :/ |
||
25 | |||
26 | (Note: Make sure that you connected the router on |
||
27 | the yellow LAN ports and not the blue WAN). |
||
28 | |||
29 | EOS |
||
30 | |||
31 | ftp -n -4 "$FRITZBOX" << END_SCRIPT |
||
32 | quote USER $USER |
||
33 | quote PASS $PASSWD |
||
34 | quote MEDIA FLSH |
||
35 | binary |
||
36 | passive |
||
37 | put $FILE mtd1 |
||
38 | quote check mtd1 |
||
39 | bye |
||
40 | END_SCRIPT |
||
41 | exit 0 |