From 18f0fc63664ba6537c04a67945fb2c49eff6ad10 Mon Sep 17 00:00:00 2001
From: Nils Schneider <nils@nilsschneider.net>
Date: Mon, 30 Sep 2013 16:59:49 +0200
Subject: [PATCH] gluon-autoupdater: read version from /lib/gluon/release

---
 package/gluon-autoupdater/Makefile                  | 2 +-
 package/gluon-autoupdater/files/usr/sbin/autoupdate | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/gluon-autoupdater/Makefile b/package/gluon-autoupdater/Makefile
index a79501ffc..09c398dec 100644
--- a/package/gluon-autoupdater/Makefile
+++ b/package/gluon-autoupdater/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/gluon-autoupdater
   SECTION:=gluon
   CATEGORY:=Gluon
-  DEPENDS:=+ecdsautils +gluon-cron
+  DEPENDS:=+ecdsautils +gluon-cron +gluon-release
   TITLE:=Automatically update firmware
 endef
 
diff --git a/package/gluon-autoupdater/files/usr/sbin/autoupdate b/package/gluon-autoupdater/files/usr/sbin/autoupdate
index 079cae2bd..f7a2208b0 100755
--- a/package/gluon-autoupdater/files/usr/sbin/autoupdate
+++ b/package/gluon-autoupdater/files/usr/sbin/autoupdate
@@ -20,7 +20,7 @@ PUBKEYS=$(uci get autoupdater.@autoupdater[0].pubkey)
 GOOD_SIGNATURES=$(uci get autoupdater.@autoupdater[0].good_signatures)
 BRANCH=$(uci get autoupdater.@autoupdater[0].branch)
 
-VERSION_FILE=/etc/firmware_version
+VERSION_FILE=/lib/gluon/release
 
 newer_than() {
   local old="$(printf '%s\n%s\n' "$1" "$2" | sort -n | head -n 1)"
-- 
GitLab