summaryrefslogtreecommitdiffhomepage
path: root/libs/rpcd-mod-luci
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2020-12-07 17:01:17 +0100
committerKarel Kočí <karel.koci@nic.cz>2020-12-07 17:01:17 +0100
commit2e0a445ed5bf1af00f8b453358fd544844c8fd73 (patch)
tree6f0ba99dacf73f6ba4741ece1c52251aba3800b6 /libs/rpcd-mod-luci
parentec49f3b546c905a4b358d54c8d2d70e86ce023a0 (diff)
rpcd-mod-*: improve postinst script
Usage of killall is replaced with init script. This is cleaner solution as it does not consider some implementation detail but rather passes that on to init script implementation. IPKG_INSTROOT was added to prevent execution when not running in current root. It is invalid to request reload if install-root is not current root. In this case it can be considered harmless but it is invalid nonetheless. Last change is removal of `exit 0`. This caused skip of default postinst. Execution of default postinst does no harm and is more standard considering possible future expansion of it. Signed-off-by: Karel Kočí <karel.koci@nic.cz>
Diffstat (limited to 'libs/rpcd-mod-luci')
-rw-r--r--libs/rpcd-mod-luci/Makefile3
1 files changed, 1 insertions, 2 deletions
diff --git a/libs/rpcd-mod-luci/Makefile b/libs/rpcd-mod-luci/Makefile
index 8833bb45ca..a39ec3b224 100644
--- a/libs/rpcd-mod-luci/Makefile
+++ b/libs/rpcd-mod-luci/Makefile
@@ -48,8 +48,7 @@ endef
define Package/rpcd-mod-luci/postinst
#!/bin/sh
-killall -HUP rpcd 2>/dev/null
-exit 0
+[ -n "$$IPKG_INSTROOT" ] || /etc/init.d/rpcd reload
endef
$(eval $(call BuildPackage,rpcd-mod-luci))