PKG_NAME:=olsrd
PKG_VERSION:=0.6.6.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.olsr.org/releases/0.6
endef
define Package/olsrd/conffiles
-/etc/config/olsrd
+/etc/config/olsrd4
+/etc/config/olsrd6
endef
define Package/olsrd-mod-arprefresh
endef
define Package/olsrd/install
+ $(INSTALL_DIR) $(1)/lib/functions
+ $(INSTALL_DATA) ./files/olsrd.init $(1)/lib/functions/olsrd.sh
$(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_DATA) ./files/olsrd.config $(1)/etc/config/olsrd
+ $(INSTALL_DATA) ./files/olsrd4.config $(1)/etc/config/olsrd4
+ $(INSTALL_DATA) ./files/olsrd6.config $(1)/etc/config/olsrd6
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/olsrd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_BIN) ./files/olsrd.init $(1)/etc/init.d/olsrd
+ $(INSTALL_BIN) ./files/olsrd4.init $(1)/etc/init.d/olsrd4
+ $(INSTALL_BIN) ./files/olsrd6.init $(1)/etc/init.d/olsrd6
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/olsrd.hotplug.sh $(1)/etc/hotplug.d/iface/50-olsrd
endef
+++ /dev/null
-config olsrd
- # uncomment the following line to use a custom config file instead:
- #option config_file '/etc/olsrd.conf'
-
- option IpVersion '4'
-
-config LoadPlugin
- option library 'olsrd_arprefresh.so.0.1'
-
-config LoadPlugin
- option library 'olsrd_dyn_gw.so.0.5'
-
-config LoadPlugin
- option library 'olsrd_httpinfo.so.0.1'
- option port '1978'
- list Net '0.0.0.0 0.0.0.0'
-
-config LoadPlugin
- option library 'olsrd_nameservice.so.0.3'
-
-config LoadPlugin
- option library 'olsrd_txtinfo.so.0.1'
- option accept '0.0.0.0'
-
-config Interface
- list interface 'wlan'
SERVICE_DAEMONIZE=1
SERVICE_WRITE_PID=1
-CONF=/var/etc/olsrd.conf
-PID=/var/run/olsrd.pid
-PID6=/var/run/olsrd.ipv6.pid
-
OLSRD_OLSRD_SCHEMA='ignore:internal config_file:internal DebugLevel=0 AllowNoInt=yes'
OLSRD_IPCCONNECT_SCHEMA='ignore:internal Host:list Net:list2'
OLSRD_LOADPLUGIN_SCHEMA='ignore:internal library:internal Host4:list Net4:list2 Host:list Net:list2 Host6:list Net6:list2 Ping:list redistribute:list NonOlsrIf:list name:list lat lon latlon_infile HNA:list2 hosts:list2'
. /lib/functions/network.sh
- config_load olsrd
+ config_load $UCI_CONF_NAME
reset_cb
OLSRD_CONFIG_FILE=
if [ -z "$OLSRD_CONFIG_FILE" ]; then
mkdir -p -- /var/etc/
- olsrd_write_config > /var/etc/olsrd.conf
+ olsrd_write_config > /var/etc/$UCI_CONF_NAME.conf
if [ "$INTERFACES_COUNT" -gt 0 -a "$OLSRD_COUNT" -gt 0 ]; then
- OLSRD_CONFIG_FILE=/var/etc/olsrd.conf
+ OLSRD_CONFIG_FILE=/var/etc/$UCI_CONF_NAME.conf
fi
fi
stop() {
SERVICE_PID_FILE="$PID"
service_stop /usr/sbin/olsrd
-
- SERVICE_PID_FILE="$PID6"
- service_stop /usr/sbin/olsrd
}
--- /dev/null
+config olsrd
+ # uncomment the following line to use a custom config file instead:
+ #option config_file '/etc/olsrd.conf'
+
+ option IpVersion '4'
+
+config LoadPlugin
+ option library 'olsrd_arprefresh.so.0.1'
+
+config LoadPlugin
+ option library 'olsrd_dyn_gw.so.0.5'
+
+config LoadPlugin
+ option library 'olsrd_httpinfo.so.0.1'
+ option port '1978'
+ list Net '0.0.0.0 0.0.0.0'
+
+config LoadPlugin
+ option library 'olsrd_nameservice.so.0.3'
+
+config LoadPlugin
+ option library 'olsrd_txtinfo.so.0.1'
+ option accept '0.0.0.0'
+
+config Interface
+ list interface 'wlan'
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2013 OpenWrt.org
+
+. /lib/functions/olsrd.sh
+
+START=65
+
+SERVICE_DAEMONIZE=1
+SERVICE_WRITE_PID=1
+
+CONF=/var/etc/olsrd4.conf
+PID=/var/run/olsrd4.pid
+
+UCI_CONF_NAME=olsrd4
--- /dev/null
+config olsrd
+ # uncomment the following line to use a custom config file instead:
+ #option config_file '/etc/olsrd6.conf'
+
+ option IpVersion '6'
+
+config LoadPlugin
+ option library 'olsrd_txtinfo.so.0.1'
+ option accept '::'
+ option port '2007'
+
+config Interface
+ list interface 'wlan'
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2013 OpenWrt.org
+
+. /lib/functions/olsrd.sh
+
+START=65
+
+SERVICE_DAEMONIZE=1
+SERVICE_WRITE_PID=1
+
+CONF=/var/etc/olsrd6.conf
+PID=/var/run/olsrd6.pid
+
+UCI_CONF_NAME=olsrd6