mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 19:14:34 +04:00
build: reload rpcd in package postinstall
Send a SIGHUP to rpcd after installing LuCI packages to reload ACL rules. Also remove redundant code while we're at it. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
13
luci.mk
13
luci.mk
@@ -221,25 +221,16 @@ define Package/$(PKG_NAME)/install
|
|||||||
else true; fi
|
else true; fi
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifneq ($(LUCI_DEFAULTS),)
|
ifndef Package/$(PKG_NAME)/postinst
|
||||||
define Package/$(PKG_NAME)/postinst
|
define Package/$(PKG_NAME)/postinst
|
||||||
[ -n "$${IPKG_INSTROOT}" ] || {$(foreach script,$(LUCI_DEFAULTS),
|
[ -n "$${IPKG_INSTROOT}" ] || {$(foreach script,$(LUCI_DEFAULTS),
|
||||||
(. /etc/uci-defaults/$(script)) && rm -f /etc/uci-defaults/$(script))
|
(. /etc/uci-defaults/$(script)) && rm -f /etc/uci-defaults/$(script))
|
||||||
rm -f /tmp/luci-indexcache
|
rm -f /tmp/luci-indexcache
|
||||||
rm -rf /tmp/luci-modulecache/
|
rm -rf /tmp/luci-modulecache/
|
||||||
|
killall -HUP rpcd 2>/dev/null
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
endef
|
endef
|
||||||
else
|
|
||||||
ifndef Package/$(PKG_NAME)/postinst
|
|
||||||
define Package/$(PKG_NAME)/postinst
|
|
||||||
[ -n "$${IPKG_INSTROOT}" ] || {
|
|
||||||
rm -f /tmp/luci-indexcache
|
|
||||||
rm -rf /tmp/luci-modulecache/
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
endef
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user