gluon-location: store lat/lon in system config

This commit is contained in:
Nils Schneider 2013-10-02 14:18:42 +02:00
parent 11331eda9b
commit b6c71dfa88
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,36 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-location
PKG_VERSION:=1
PKG_location:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/gluon-location
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Add system.location to uci
DEPENDS:=+gluon-core
endef
define Package/gluon-location/description
This packages creates /lib/gluon/location.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/gluon-location/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,gluon-location))

View File

@ -0,0 +1,12 @@
#!/bin/sh
CFG="@system[0]"
uci -q batch <<EOF
set system.${CFG}.share_location=0
set system.${CFG}.latitude=0
set system.${CFG}.longitude=0
commit system
EOF