mirror of
https://github.com/openwrt/luci
synced 2025-01-07 03:27:12 +08:00
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>
This commit is contained in:
parent
ec49f3b546
commit
2e0a445ed5
@ -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))
|
||||
|
@ -41,8 +41,7 @@ endef
|
||||
|
||||
define Package/rpcd-mod-rad2-enc/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-rad2-enc))
|
||||
|
@ -40,8 +40,7 @@ endef
|
||||
|
||||
define Package/rpcd-mod-rrdns/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-rrdns))
|
||||
|
Loading…
Reference in New Issue
Block a user