tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Startup script for vpnc



                        Hi tech-pkg@,

I've just been looking at vpnc; was wondering if I could commit the 
following once I can confirm that it really works. It registers a startup 
script for vpnc.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/vpnc/Makefile,v
retrieving revision 1.28
diff -p -u -r1.28 Makefile
--- Makefile    22 Apr 2011 13:44:29 -0000      1.28
+++ Makefile    29 Sep 2012 03:20:56 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=              vpnc-0.5.3
-PKGREVISION=           3
+PKGREVISION=           4
 CATEGORIES=            net security
 MASTER_SITES=          http://www.unix-ag.uni-kl.de/~massar/vpnc/
 
@@ -43,6 +43,7 @@ CONF_FILES_MODE=      0600
 CONF_FILES_PERMS+=     ${EGDIR}/vpnc-script \
                        ${PKG_SYSCONFDIR}/vpnc/vpnc-script \
                        ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
+RCD_SCRIPTS=           vpnc
 
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/vpnc ${DESTDIR}${PREFIX}/sbin
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/net/vpnc/PLIST,v
retrieving revision 1.6
diff -p -u -r1.6 PLIST
--- PLIST       14 Jun 2009 18:09:47 -0000      1.6
+++ PLIST       29 Sep 2012 03:20:56 -0000
@@ -7,5 +7,6 @@ man/man1/pcf2vpnc.1
 man/man8/vpnc.8
 sbin/vpnc
 share/doc/vpnc/README
+share/examples/rc.d/vpnc
 share/examples/vpnc/default.conf
 share/examples/vpnc/vpnc-script

The script itself, inspired from net/openvpn

=== BEGIN PASTE ===
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD$
#

# PROVIDE: vpnc
# REQUIRE: NETWORKING

[ -f /etc/rc.subr ] && . /etc/rc.subr

name="vpnc"
rcvar=$name
command="@PREFIX@/sbin/${name}"
vpnc_flags="--pid-file @VARBASE@/run/${name}.pid"

load_rc_config $name
run_rc_command "$1"
=== END PASTE ===

Cheers,
-- 
khorben



Home | Main Index | Thread Index | Old Index