Skip to content
Browse files

fix upgrade stupidity

  • Loading branch information...
1 parent 5e1579b commit a49cb546a29f7a909a895a7844bebd123528c197 @makefu makefu committed May 10, 2013
Showing with 2 additions and 10 deletions.
  1. +2 −10 upgrade
View
12 upgrade
@@ -1,15 +1,11 @@
#!/bin/bash
-OWN_ADDR=${OWN_ADDR:-192.168.0.1}
-PORT=8080
IMAGE=${IMAGE:-openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin}
cd $(dirname $(readlink -f $0))
if [ -z "${1:-}" ];then
echo "usage: $0 ADDRESS"
echo
echo "ENVIRONMENT:"
- echo " OWN_ADDR (currently $OWN_ADDR)"
echo " IMAGE (currently $IMAGE)"
- echo " PORT (currently $PORT)"
exit 1
fi
@@ -18,13 +14,9 @@ IP=$1
cd builder/bin/ar71xx/
if [ -e "$IMAGE" ];then
- python2 -m SimpleHTTPServer $PORT &
- sleep 1
- SERVER_PID=$!
- ssh root@$IP "wget -O /tmp/firmware.bin http://${OWN_ADDR}:${PORT}/${IMAGE} \
- && /sbin/mtd write /tmp/firmware.bin firmware \
+ scp $IMAGE root@$IP:/tmp/firmware.bin
+ ssh root@$IP "/sbin/mtd write /tmp/firmware.bin firmware \
&& /sbin/reboot"
- kill $SERVER_PID
else
echo "cannot find ar71xx build, aborting"
exit 1

0 comments on commit a49cb54

Please sign in to comment.
Something went wrong with that request. Please try again.