packages/olsrd: use new service functions
git-svn-id: svn://svn.openwrt.org/openwrt/packages@29065 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
a9d02a667d
commit
1df02c4d18
@ -1,5 +1,5 @@
|
||||
#
|
||||
# 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.
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
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
|
||||
|
@ -1,8 +1,13 @@
|
||||
#!/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'
|
||||
@ -596,17 +601,16 @@ start() {
|
||||
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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user