hnetd: Enable multicast support when pimbd is present
authorOryon <pierre@darou.fr>
Tue, 18 Aug 2015 15:42:48 +0000 (08:42 -0700)
committerOryon <pierre@darou.fr>
Tue, 18 Aug 2015 15:42:48 +0000 (08:42 -0700)
hnetd/Makefile
hnetd/files/hnetd.init

index 03e3fb93e547c101f90da82cddecafa42b3b2084..dbeb586edb7b7b6faaec31f6b721feef40780505 100644 (file)
@@ -7,8 +7,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hnetd
-PKG_SOURCE_VERSION:=a6b4b6f1f5d38646fa11064cf7394719e048bc87
-PKG_VERSION:=2015-07-28-$(PKG_SOURCE_VERSION)
+PKG_SOURCE_VERSION:=b5a03142135c9ab2680027d1fd8c149d2c46e74b
+PKG_VERSION:=2015-08-18-$(PKG_SOURCE_VERSION)
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
@@ -120,6 +120,7 @@ define Package/hnetd-$(BUILD_VARIANT)/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/generic/hnetd-routing $(1)/usr/sbin/hnetd-routing
        $(INSTALL_DIR) $(1)/etc/uci-defaults
        $(INSTALL_BIN) ./files/hnetd.defaults $(1)/etc/uci-defaults/x-hnetd.defaults
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/generic/multicast.script $(1)/usr/sbin/hnet-multicast
 endef
 
 define Package/hnet-full/install
index 6b98b8c790b6dc269e3263a5bcb24c33a5757ad6..c4419eed4473cbe6cd57a6d275117f14c8a8cf23 100644 (file)
@@ -14,6 +14,7 @@ OHP_SCRIPT=/usr/sbin/hnetd-ohp-script
 OHP_BINARY=/usr/sbin/ohybridproxy
 PCP_SCRIPT=/usr/sbin/hnetd-pcp-script
 PCP_BINARY=/usr/sbin/minimalist-pcproxy
+MULTICAST_SCRIPT=/usr/sbin/hnet-multicast
 
 start_service() {
     . /lib/functions.sh
@@ -37,6 +38,12 @@ start_service() {
             procd_append_param command -n "$HOSTNAME"
         fi
     fi
+       
+    # Enable multicast if present and installed
+    if [ -f "$MULTICAST_SCRIPT" ]
+    then
+        $MULTICAST_SCRIPT status && procd_append_param command -M "$MULTICAST_SCRIPT"
+    fi
 
     # Enable PCP, if it's present
     if [ -f $PCP_BINARY -a -f $PCP_SCRIPT ]