hnetd: improve postinst logic
authorSteven Barth <steven@midlink.org>
Sat, 1 Mar 2014 15:04:34 +0000 (16:04 +0100)
committerSteven Barth <steven@midlink.org>
Sat, 1 Mar 2014 15:04:34 +0000 (16:04 +0100)
hnetd/Makefile

index 500cbb34bf146b0c6e1ca534c543166fabf870da..5120d6fb5d4c0490a3267c079d93be7fb5b98717 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hnetd
 PKG_SOURCE_VERSION:=1031619a9319baeee68ddd2bcb76c8d74089ba27
-PKG_VERSION:=2014-02-28-$(PKG_SOURCE_VERSION)
+PKG_VERSION:=2014-03-01-$(PKG_SOURCE_VERSION)
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
@@ -72,7 +72,12 @@ endef
 
 define Package/hnetd/postinst
 #!/bin/sh
-[ -n "$${IPKG_INSTROOT}" ] || (. /etc/uci-defaults/x-hnetd.defaults) && rm -f /etc/uci-defaults/x-hnetd.defaults
+[ -n "$${IPKG_INSTROOT}" ] || {
+       (. /etc/uci-defaults/x-hnetd.defaults) && rm -f /etc/uci-defaults/x-hnetd.defaults
+       [ -x /etc/init.d/dnsmasq ] && /etc/init.d/dnsmasq restart
+       /etc/init.d/hnetd enable
+       /etc/init.d/hnetd start
+}
 exit 0
 endef