summaryrefslogtreecommitdiffhomepage
path: root/modules/freifunk/root
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-06-30 04:41:00 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-06-30 04:41:00 +0000
commit105713ff8fec7e6110f6eff120c7765e560bbac8 (patch)
tree27e3befbc929ba23609e264913e1a0de540cc28e /modules/freifunk/root
parent55a4c40c03d5e00942f525b70e613c33e783ce99 (diff)
modules/freifunk: add webpages for remote-update
Diffstat (limited to 'modules/freifunk/root')
-rw-r--r--modules/freifunk/root/etc/config/freifunk1
-rwxr-xr-xmodules/freifunk/root/usr/sbin/remote-update12
2 files changed, 11 insertions, 2 deletions
diff --git a/modules/freifunk/root/etc/config/freifunk b/modules/freifunk/root/etc/config/freifunk
index 49112894c6..d6f3d57dfd 100644
--- a/modules/freifunk/root/etc/config/freifunk
+++ b/modules/freifunk/root/etc/config/freifunk
@@ -78,6 +78,7 @@ config defaults time
config defaults upgrade
option repository "http://dev.luci.freifunk-halle.net/freifunk-snapshots"
+ option rssfeed "http://firmware.leipzig.freifunk.net/kamikaze/.rss.xml"
config community leipzig
option name "Freifunk Leipzig"
diff --git a/modules/freifunk/root/usr/sbin/remote-update b/modules/freifunk/root/usr/sbin/remote-update
index 3f50f32073..67751d6cfd 100755
--- a/modules/freifunk/root/usr/sbin/remote-update
+++ b/modules/freifunk/root/usr/sbin/remote-update
@@ -49,9 +49,14 @@ find_local_checksum()
echo $1
}
+find_remote_info()
+{
+ wget -qO- "${1%/*}/VERSION.txt" 2>/dev/null
+}
+
find_remote_version()
{
- wget -qO- "${1%/*}/VERSION.txt" 2>/dev/null | \
+ find_remote_info "$1" | \
sed -ne "s!.*$D4/$D2/$D2 $D2:$D2.*!\\1\\2\\3\\4\\5!p;t"
}
@@ -197,9 +202,12 @@ if [ "$checkupdate" = 1 ]; then
[ -n "$v1" -a -n "$v2" ] && {
version_compare "$v1" "$v2"
[ $? == 2 ] && {
- echo "Update available! $v1 -> $v2"
+ echo "Update available!${NL}Local: $v1${NL}Remote: $v2${NL}--"
+ find_remote_info "$image_url"
+ exit 0
} || {
echo "Local version $v1 is up to date"
+ exit 2
}
} || {
echo "No remote time stamp found."