From c8a6b91ba16b6b32ea4510b0576160096d5f110f Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 9 Nov 2011 23:38:00 +0000 Subject: [PATCH] packages/ipsec-tools: use new service functions git-svn-id: svn://svn.openwrt.org/openwrt/packages@28911 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/ipsec-tools/Makefile | 2 +- net/ipsec-tools/files/racoon.init | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/net/ipsec-tools/Makefile b/net/ipsec-tools/Makefile index 48b1d5929..34d0c0ae8 100644 --- a/net/ipsec-tools/Makefile +++ b/net/ipsec-tools/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ipsec-tools PKG_VERSION:=0.8.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/ipsec-tools diff --git a/net/ipsec-tools/files/racoon.init b/net/ipsec-tools/files/racoon.init index e8d287000..d539b363f 100644 --- a/net/ipsec-tools/files/racoon.init +++ b/net/ipsec-tools/files/racoon.init @@ -1,17 +1,17 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2009 OpenWrt.org -START=49 +# Copyright (C) 2009-2011 OpenWrt.org # Copyright (C) 2011 Artem Makhutov -start() { - setkey -f /etc/ipsec.conf - mkdir /var/racoon/ +START=49 - /usr/sbin/racoon -f /etc/racoon/racoon.conf +SERVICE_USE_PID=1 + +start() { + mkdir -m 0700 -p /var/racoon + [ -f /etc/ipsec.conf ] && /usr/sbin/setkey -f /etc/ipsec.conf + service_start /usr/sbin/racoon -f /etc/racoon.conf } stop() { - killall racoon - killall racoonctl + service_stop /usr/sbin/racoon } -