From 1c65f42c26c097947688c38c99ef81c43d250852 Mon Sep 17 00:00:00 2001 From: Dan Staples Date: Tue, 25 Feb 2014 17:04:44 -0500 Subject: [PATCH] added uci-defaults script to luci-commotion-apps --- packages/luci-commotion-apps/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/luci-commotion-apps/Makefile b/packages/luci-commotion-apps/Makefile index 2da1352..3ca879b 100644 --- a/packages/luci-commotion-apps/Makefile +++ b/packages/luci-commotion-apps/Makefile @@ -46,6 +46,15 @@ define Package/$(PKG_NAME)/install $(CP) $(PKG_BUILD_DIR)/luci-static/$(THEME_NAME)/* $(1)/www/luci-static/$(THEME_NAME)/ || true $(INSTALL_DIR) $(1)/usr/lib/lua $(CP) $(PKG_BUILD_DIR)/lua/* $(1)/usr/lib/lua/ || true + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci-defaults/* $(1)/etc/uci-defaults/ +endef + +define Package/$(PKG_NAME)/postinst +#!/bin/sh +[ -n "$${IPKG_INSTROOT}" ] || { + ( . /etc/uci-defaults/$(PKG_NAME) ) && rm -f /etc/uci-defaults/$(PKG_NAME) +} endef $(eval $(call BuildPackage,$(PKG_NAME)))