From 4918c60ac222b0c6737deadf307c01756be7b2bc Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 7 Jul 2009 04:02:33 +0000 Subject: [PATCH] luci-0.9: merge r5022 and r5023 --- contrib/package/luci/Makefile | 3 +- contrib/package/remote-update/Makefile | 43 +++++++++++++++++++ .../files}/usr/sbin/remote-update | 3 +- 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 contrib/package/remote-update/Makefile rename {modules/freifunk/root => contrib/package/remote-update/files}/usr/sbin/remote-update (97%) diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile index 61f02938e..58638ca20 100644 --- a/contrib/package/luci/Makefile +++ b/contrib/package/luci/Makefile @@ -335,7 +335,8 @@ define Package/luci-freifunk-community +PACKAGE_luci-freifunk-community:olsrd-luci +PACKAGE_luci-freifunk-community:olsrd-luci-mod-dyn-gw-plain \ +PACKAGE_luci-freifunk-community:olsrd-luci-mod-txtinfo +PACKAGE_luci-freifunk-community:olsrd-luci-mod-nameservice \ +PACKAGE_luci-freifunk-community:olsrd-luci-mod-watchdog +PACKAGE_luci-freifunk-community:kmod-tun \ - +PACKAGE_luci-freifunk-community:ip +PACKAGE_luci-freifunk-community:freifunk-watchdog +luci-app-olsr + +PACKAGE_luci-freifunk-community:ip +PACKAGE_luci-freifunk-community:freifunk-watchdog +luci-app-olsr \ + +PACKAGE_luci-freifunk-community:remote-update TITLE:=Freifunk Community Meta-Package endef diff --git a/contrib/package/remote-update/Makefile b/contrib/package/remote-update/Makefile new file mode 100644 index 000000000..c8adceeaa --- /dev/null +++ b/contrib/package/remote-update/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2009 Jo-Philipp Wich +# +# This is free software, licensed under the Apache 2.0 license. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=remote-update +PKG_RELEASE:=1 + +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/remote-update + SECTION:=luci + CATEGORY:=LuCI + SUBMENU:=Freifunk + TITLE:=Freifunk remote update utility. + DEPENDS:=@TARGET_atheros||@TARGET_ar71xx||@TARGET_brcm-2.4 +endef + +define Package/remote-update/description + The freifunk remote-update utility uses sysupgrade to reflash the currently + running firmware while keeping most of the existing configuratio. +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/remote-update/install + $(CP) ./files/* $(1)/ +endef + +$(eval $(call BuildPackage,remote-update)) diff --git a/modules/freifunk/root/usr/sbin/remote-update b/contrib/package/remote-update/files/usr/sbin/remote-update similarity index 97% rename from modules/freifunk/root/usr/sbin/remote-update rename to contrib/package/remote-update/files/usr/sbin/remote-update index b900ada31..bffc449d0 100755 --- a/modules/freifunk/root/usr/sbin/remote-update +++ b/contrib/package/remote-update/files/usr/sbin/remote-update @@ -174,6 +174,7 @@ local image_name="${image_url##*/}" local arch=$(find_architecture) local image=$(find_image "$arch") local repo=$(uci get freifunk.upgrade.repository 2>/dev/null) + repo=${repo:-$(uci get system.upgrade.repository 2>/dev/null)} [ -z "$arch" ] && { echo "Can not determine the current architecture." @@ -181,7 +182,7 @@ local image_name="${image_url##*/}" } [ -z "$repo" ] && { - echo "No repository configured in 'freifunk.upgrade.repository'." + echo "No repository configured in 'system.upgrade.repository'." echo "Use the '-u' flag to specify an image location." exit 1 } -- 2.25.1