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 03e3fb9..dbeb586 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 6b98b8c..c4419ee 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 ]