summaryrefslogtreecommitdiff
path: root/security/openvpn20/files
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>2008-02-24 03:11:57 +0000
committercvs2svn <cvs2svn@FreeBSD.org>2008-02-24 03:11:57 +0000
commitfa4a943c17e47bf910596a414fd7287983350b9b (patch)
treedc76cec18a505befc330e612e0a56bf1caa5ca49 /security/openvpn20/files
parent- Fix manpage pointing to correct PREFIX for binary and conf (diff)
This commit was manufactured by cvs2svn to create tag 'RELEASE_7_0_0'.release/7.0.0
Diffstat (limited to 'security/openvpn20/files')
-rw-r--r--security/openvpn20/files/openvpn.sh.in131
-rw-r--r--security/openvpn20/files/pkg-message.in20
-rw-r--r--security/openvpn20/files/pkg-req.in29
3 files changed, 0 insertions, 180 deletions
diff --git a/security/openvpn20/files/openvpn.sh.in b/security/openvpn20/files/openvpn.sh.in
deleted file mode 100644
index ee9853a121d8..000000000000
--- a/security/openvpn20/files/openvpn.sh.in
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/bin/sh
-#
-# openvpn.sh - load tun/tap driver and start OpenVPN daemon
-#
-# (C) Copyright 2005 - 2007 by Matthias Andree
-# based on suggestions by Matthias Grimm and Dirk Gouders
-# with multi-instance contribution from Denis Shaposhnikov, Gleb Kozyrev
-# and Vasil Dimov
-#
-# $FreeBSD$
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-# details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
-# Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# PROVIDE: openvpn
-# REQUIRE: DAEMON
-# KEYWORD: shutdown
-
-# -----------------------------------------------------------------------------
-#
-# This script supports running multiple instances of openvpn.
-# To run additional instance link this script to something like
-# % ln -s openvpn openvpn_foo
-# and define additional openvpn_foo_* variables in one of
-# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/openvpn_foo
-#
-# Below NAME should be substituted with the name of this script. By default
-# it is openvpn, so read as openvpn_enable. If you linked the script to
-# openvpn_foo, then read as openvpn_foo_enable etc.
-#
-# The following variables are supported (defaults are shown).
-# You can place them in any of
-# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/NAME
-#
-# NAME_enable="NO" # set to YES to enable openvpn
-# NAME_if="" # driver(s) to load, set to "tun", "tap" or "tun tap"
-#
-# # optional:
-# NAME_flags="" # additional command line arguments
-# NAME_configfile="%%PREFIX%%/etc/openvpn/NAME.conf" # --config file
-# NAME_dir="%%PREFIX%%/etc/openvpn" # --cd directory
-#
-# You also need to set NAME_configfile and NAME_dir, if the configuration
-# file and directory where keys and certificates reside differ from the above
-# settings.
-#
-# Note that we deliberately refrain from unloading drivers.
-#
-# For further documentation, please see openvpn(8).
-#
-
-. %%RC_SUBR%%
-
-case "$0" in
-/etc/rc*)
- # during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown),
- # so get the name of the script from $_file
- name=$(basename "$_file" .sh)
- ;;
-*)
- name=$(basename "$0" .sh)
- ;;
-esac
-
-rcvar=$(set_rcvar)
-
-prefix="%%PREFIX%%"
-
-openvpn_precmd()
-{
- for i in $interfaces ; do
- # FreeBSD <= 5.4 does not know kldstat's -m option
- # FreeBSD >= 6.0 does not add debug.* sysctl information
- # in the default build - we check both to keep things simple
- if ! sysctl debug.if_${i}_debug >/dev/null 2>&1 \
- && ! kldstat -m if_${i} >/dev/null 2>&1 ; then
- if ! kldload if_${i} ; then
- warn "Could not load $i module."
- return 1
- fi
- fi
- done
- return 0
-}
-
-stop_postcmd()
-{
- rm -f "$pidfile" || warn "Could not remove $pidfile."
-}
-
-# support SIGHUP to reparse configuration file
-extra_commands="reload"
-
-# pidfile
-pidfile="/var/run/${name}.pid"
-
-# command and arguments
-command="%%PREFIX%%/sbin/openvpn"
-
-# run this first
-start_precmd="openvpn_precmd"
-# and this last
-stop_postcmd="stop_postcmd"
-
-load_rc_config ${name}
-
-eval ": \${${name}_enable:=\"NO\"}"
-eval ": \${${name}_flags:=\"\"}"
-eval ": \${${name}_if:=\"\"}"
-eval ": \${${name}_configfile:=\"${prefix}/etc/openvpn/${name}.conf\"}"
-eval ": \${${name}_dir:=\"${prefix}/etc/openvpn\"}"
-
-configfile="$(eval echo \${${name}_configfile})"
-dir="$(eval echo \${${name}_dir})"
-interfaces="$(eval echo \${${name}_if})"
-
-required_files=${configfile}
-command_args="--cd ${dir} --daemon --config ${configfile} --writepid ${pidfile}"
-
-run_rc_command "$1"
diff --git a/security/openvpn20/files/pkg-message.in b/security/openvpn20/files/pkg-message.in
deleted file mode 100644
index 64494e4d6a85..000000000000
--- a/security/openvpn20/files/pkg-message.in
+++ /dev/null
@@ -1,20 +0,0 @@
-### ------------------------------------------------------------------------
-### The OpenVPN FreeBSD port, since v2.0.1, uses rcNG to start OpenVPN.
-### Edit /etc/rc.conf to start OpenVPN automatically at system startup.
-### See %%PREFIX%%/etc/rc.d/openvpn%%RCSFX%% for details.
-### ------------------------------------------------------------------------
-### To get OpenVPN 1.X to talk with the new 2.0 version, you may need to
-### edit the 1.X configuration file by adding these lines:
-### tun-mtu 1500
-### tun-mtu-extra 32
-### mssfix 1450
-### key-method 2 <- this key-method line only for TLS setups
-### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-### WARNING: THE DEFAULT PORT HAS CHANGED AND IS NOW 1194!
-### OpenVPN 1.6 and older used 5000 rather than 1194 as their default
-### port, so add the proper port options to your configuration file!
-### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-### For further compatibility, see <http://openvpn.net/relnotes.html>
-### ------------------------------------------------------------------------
-### If you want to donate to OpenVPN: <http://openvpn.net/donate.html>
-### ------------------------------------------------------------------------
diff --git a/security/openvpn20/files/pkg-req.in b/security/openvpn20/files/pkg-req.in
deleted file mode 100644
index 15c8242d8724..000000000000
--- a/security/openvpn20/files/pkg-req.in
+++ /dev/null
@@ -1,29 +0,0 @@
-set -e
-
-rcvers() {
- # determine if we have "old" or "new" (rcorder integration) scheme
- # for %%PREFIX%%/etc/rc.d/* files
- if test $1 -ge 700007 || test $1 -lt 700000 -a $1 -ge 600101 ; then
- echo 2
- else
- echo 1
- fi
-}
-
-if [ "$2" = INSTALL ] ; then
- # check if the base system is new enough for us,
- # which should only matter for package installs.
- buildrc=$(rcvers %%OSVERSION%%)
- execrc=$(rcvers $(sysctl -n kern.osreldate) )
- if test $buildrc -gt $execrc ; then
- cat <<EOF
-
-Error: this package, $1, was compiled for a newer FreeBSD
-====== version that uses different boot scripts.
- Therefore, the rc.d script WILL NOT WORK.
- Please update your ports tree and install security/openvpn from there.
-
-EOF
- exit 1
- fi
-fi