summaryrefslogtreecommitdiffstats
path: root/minikrebs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-01-07 08:52:39 +0700
committermakefu <github@syntax-fehler.de>2013-01-07 08:52:39 +0700
commit9a5edaac48e2461aa247204fbcea37d805bf38f0 (patch)
tree6128fadac5b43fe66c4993b8a0515d80d3e148cd /minikrebs
parentf90ac125ccfd08fc1448fd78ad0ad373b2622077 (diff)
add upgrade script for rapid deployment
Diffstat (limited to 'minikrebs')
-rw-r--r--minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/network17
-rwxr-xr-xminikrebs/upgrade31
2 files changed, 42 insertions, 6 deletions
diff --git a/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/network b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/network
index c459c4e0..04722166 100644
--- a/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/network
+++ b/minikrebs/profiles/camkrebs_zc3xx/customfiles/etc/config/network
@@ -1,9 +1,14 @@
+
config interface 'loopback'
- option ifname 'lo'
- option proto 'static'
- option ipaddr '127.0.0.1'
- option netmask '255.0.0.0'
+ option ifname 'lo'
+ option proto 'static'
+ option ipaddr '127.0.0.1'
+ option netmask '255.0.0.0'
config interface 'lan'
- option ifname 'eth0'
- option proto 'dhcp'
+ option ifname 'eth0'
+ option proto 'dhcp'
+
+config interface 'wan'
+ option ifname 'wlan0'
+ option proto 'dhcp'
diff --git a/minikrebs/upgrade b/minikrebs/upgrade
new file mode 100755
index 00000000..e36ed5ad
--- /dev/null
+++ b/minikrebs/upgrade
@@ -0,0 +1,31 @@
+#!/bin/sh
+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 [ x"${1:-}" == x ];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
+
+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} \
+ && mtd write /tmp/firmware.bin firmware \
+ && reboot"
+ kill $SERVER_PID
+else
+ echo "cannot find ar71xx build, aborting"
+ exit 1
+fi