From 54149c0e730fcd9f50efe4a2a6afa2d075d86d37 Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Sun, 13 Nov 2011 22:15:58 +0000 Subject: [PATCH] packages/olsrd: use new service functions SVN-Revision: 29065 --- net/olsrd/Makefile | 4 ++-- net/olsrd/files/olsrd.init | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/net/olsrd/Makefile b/net/olsrd/Makefile index 94c5f6651..4ab85f179 100644 --- a/net/olsrd/Makefile +++ b/net/olsrd/Makefile @@ -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 diff --git a/net/olsrd/files/olsrd.init b/net/olsrd/files/olsrd.init index dd82bb561..db043279d 100644 --- a/net/olsrd/files/olsrd.init +++ b/net/olsrd/files/olsrd.init @@ -1,8 +1,13 @@ #!/bin/sh /etc/rc.common +# Copyright (C) 2008-2011 OpenWrt.org # Copyright (C) 2008 Alina Friedrichsen # 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 } -- 2.30.2