#
-# Copyright (C) 2009-2010 OpenWrt.org
+# Copyright (C) 2009-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=olsrd
PKG_VERSION:=0.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
#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2011 OpenWrt.org
# Copyright (C) 2008 Alina Friedrichsen <x-alina@gmx.net>
# Special thanks to bittorf wireless ))
+
START=65
+SERVICE_DAEMONIZE=1
+SERVICE_WRITE_PID=1
+
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'
sysctl -w net.ipv6.bindv6only=1
sed -e 's/^\t\t[0-9.]*[ ][0-9.]*$//' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv6
sed -i '/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/d' /var/etc/olsrd.conf.ipv6
- olsrd -f /var/etc/olsrd.conf.ipv6 -nofork < /dev/null > /dev/null &
-
+ service_start /usr/sbin/olsrd -f /var/etc/olsrd.conf.ipv6 -nofork
sed -e 's/^IpVersion[ ][ ]*6$/IpVersion 4/' -e 's/^\t\t[A-Fa-f0-9.:]*[:][A-Fa-f0-9.:]*[ ][0-9]*$//' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv4
- olsrd -f /var/etc/olsrd.conf.ipv4 -nofork < /dev/null > /dev/null &
+ service_start /usr/sbin/olsrd -f /var/etc/olsrd.conf.ipv4 -nofork
sleep 3
sysctl -w net.ipv6.bindv6only="$bindv6only"
else
- olsrd -f "$OLSRD_CONFIG_FILE" -nofork < /dev/null > /dev/null &
+ service_start /usr/sbin/olsrd -f "$OLSRD_CONFIG_FILE" -nofork
fi
}
stop() {
- killall olsrd
+ service_stop /usr/sbin/olsrd
}