From 0e84af3d048b0f22793ec7b71f2a3fb8b074f158 Mon Sep 17 00:00:00 2001 From: Bart Van Der Meerssche Date: Wed, 30 Mar 2011 20:18:56 +0200 Subject: [PATCH] [fluksod] get http client version from system.@system[0].version --- mote/v2/openwrt/package/flukso/luasrc/fluksod.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mote/v2/openwrt/package/flukso/luasrc/fluksod.lua b/mote/v2/openwrt/package/flukso/luasrc/fluksod.lua index 2660090..2d512d4 100755 --- a/mote/v2/openwrt/package/flukso/luasrc/fluksod.lua +++ b/mote/v2/openwrt/package/flukso/luasrc/fluksod.lua @@ -27,7 +27,6 @@ local nixio = require 'nixio' nixio.fs = require 'nixio.fs' local uci = require 'luci.model.uci'.cursor() local httpclient = require 'luci.httpclient' -local opkg = require 'luci.model.ipkg' local data = require 'flukso.data' local arg = arg or {} -- needed when this code is not loaded via the interpreter @@ -68,8 +67,8 @@ local WAN_KEY = '0123456789abcdef0123456789abcdef' uci:foreach('system', 'system', function(x) WAN_KEY = x.key end) -- quirky but it works -- https headers -local FLUKSO_OPKG_INFO = opkg.info('flukso') -local FLUKSO_VERSION = FLUKSO_OPKG_INFO.flukso.Version +local FLUKSO_VERSION = '000' +uci:foreach('system', 'system', function(x) FLUKSO_VERSION = x.version end) -- quirky but it works, again local USER_AGENT = 'Fluksometer v' .. FLUKSO_VERSION local CACERT = '/etc/ssl/certs/flukso.ca.crt'