Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=48dee0637fb69f0e2fdfd1b9e39eb5403c97751d

commit 48dee0637fb69f0e2fdfd1b9e39eb5403c97751d
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Fri Sep 17 16:49:25 2010 +0000

openvpn-2.1.3-2-i686
*rewrite rc script

diff --git a/source/network-extra/openvpn/FrugalBuild 
b/source/network-extra/openvpn/FrugalBuild
index fbf4877..dfe6fe8 100644
--- a/source/network-extra/openvpn/FrugalBuild
+++ b/source/network-extra/openvpn/FrugalBuild
@@ -4,7 +4,7 @@

pkgname=openvpn
pkgver=2.1.3
-pkgrel=1
+pkgrel=2
pkgdesc="A secure tunneling daemon"
url="http://www.openvpn.org/";
depends=('openssl>=1.0.0' 'lzo')
@@ -13,7 +13,7 @@ archs=('i686' 'x86_64')
up2date="lynx -dump 'http://openvpn.net/release/?C=M&O=D' |grep -v beta| grep 
'$pkgname.*.tar.\(gz\|bz2\)' | sed -ne 's|.*$pkgname-\(.*\).tar.*|\1|g;1 p'"
source=(http://www.openvpn.net/release/$pkgname-$pkgver.tar.gz rc.openvpn)
sha1sums=('91058e78c58c2e66298c7132bea1ddba52baaa82' \
-          'e7c5939341fc2d7aa448ff0fd8ddbb2b401c2070')
+          '4f0faa66f3562a6a76bdc6f6ed1db96b2ab974de')

build()
{
diff --git a/source/network-extra/openvpn/rc.openvpn 
b/source/network-extra/openvpn/rc.openvpn
index 9f8db36..b2247da 100644
--- a/source/network-extra/openvpn/rc.openvpn
+++ b/source/network-extra/openvpn/rc.openvpn
@@ -1,10 +1,18 @@
#!/bin/sh

# (c) 2003 Vajna Miklos <vmik...@frugalware.org>
-# rc.sshd for FrugalWare
+# rc.openvpn for FrugalWare
# distributed under GPL License

-. /etc/rc.d/rc.functions
+# chkconfig: 2345 32 56
+# description: Starts or stops the openvpn daemon
+
+TEXTDOMAIN=openvpn
+TEXTDOMAINDIR=/lib/initscripts/messages
+source /lib/initscripts/functions
+daemon="openvpn daemon"
+
+actions=(start stop restart status)

openvpn=""
openvpn_locations="/usr/sbin/openvpn /usr/local/sbin/openvpn"
@@ -32,9 +40,9 @@ then
exit 0
fi

-
-if [ "$1" = "stop" ]; then
-       stop "$stopvpn"
+rc_stop()
+{
+       stop_msg
for pidf in `/bin/ls $piddir/*.pid 2>/dev/null`; do
if [ -s $pidf ]; then
kill `cat $pidf` >/dev/null 2>&1
@@ -49,13 +57,12 @@ if [ "$1" = "stop" ]; then

rm -f $lock
ok $?
+}

-elif [ "$1" = "restart" ]; then
-       $0 stop
-       sleep 2
-       $0 start
-else # start
-       start "$startvpn"
+rc_start()
+{
+
+       start_msg
/sbin/modprobe tun >/dev/null 2>&1

# From a security perspective, I think it makes
@@ -102,4 +109,21 @@ else # start
done

ok $?
-fi
+}
+
+rc_status()
+{
+        msg "$daemon are"
+       if [ -f $lock ]; then
+           for pidf in `/bin/ls $piddir/*.pid 2>/dev/null`; do
+               if [ -s $pidf ]; then
+                       # started
+                       ok 997
+                       return
+               fi
+           done
+       fi
+       ok 998
+
+}
+rc_exec $1
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to