FreeBSD Bugzilla – Attachment 74980 Details for
Bug 108371
Update port: security/openvpn (add profiles support to startup)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-3.diff
patch-3.diff (text/x-diff; charset=us-ascii), 3.31 KB, created by
Vasil Dimov
on 2007-02-01 16:08:17 UTC
(
hide
)
Description:
patch-3.diff
Filename:
MIME Type:
Creator:
Vasil Dimov
Created:
2007-02-01 16:08:17 UTC
Size:
3.31 KB
patch
obsolete
>--- openvpn.orig Thu Feb 1 17:37:32 2007 >+++ openvpn Thu Feb 1 17:43:39 2007 >@@ -37,6 +37,7 @@ > # > # # optional: > # openvpn_flags="" # openvpn command line flags >+# openvpn_configdir="/usr/local/etc/openvpn" # config directory > # openvpn_configfile="/usr/local/etc/openvpn/openvpn.conf" # --config file > # openvpn_dir="/usr/local/etc/openvpn" # --cd directory > # >@@ -44,6 +45,21 @@ > # file and directory where keys and certificates reside differ from the above > # settings. > # >+# Add "openvpn_profiles" to run several instances of openvpn with >+# different parameters. Consider the following example: >+# >+# openvpn_enable="YES" >+# openvpn_profiles="default tcp" >+# >+# This will run two instances of openvpn: one with default config and pidfile >+# and the other with config file /usr/local/etc/openvpn/tcp.conf >+# and pidfile /var/run/openvpn_tcp.pid >+# >+# You may specify different locations by setting openvpn_NAME_xxx variables: >+# >+# openvpn_tcp_configfile="/usr/local/etc/other/openvpn_tcp.conf" >+# openvpn_tcp_pidfile="/var/run/openpvn_tcp.pid" >+# > # Note that we deliberately refrain from unloading drivers. > # > # For further documentation, please see openvpn(8). >@@ -78,6 +94,54 @@ > rm -f "$pidfile" || warn "Could not remove $pidfile." > } > >+setup_profile_vars() >+{ >+ name=openvpn_$1 >+ eval ": \${openvpn_${1}_configfile=${openvpn_configdir}/${1}.conf}" >+ eval ": \${openvpn_${1}_dir=${openvpn_dir}}" >+ eval ": \${openvpn_${1}_flags=${openvpn_flags}}" >+ eval ": \${openvpn_${1}_pidfile=/var/run/openvpn_${1}.pid}" >+ eval "pidfile=\"\${openvpn_${1}_pidfile}\"" >+ eval "required_files=\"\${openvpn_${1}_configfile}\"" >+ eval "command_args=\"--cd \${openvpn_${1}_dir} --daemon --config \${openvpn_${1}_configfile} --writepid \${pidfile}\"" >+} >+ >+start_profiles() >+{ >+ unset start_cmd start_precmd >+ for _profile in ${openvpn_profiles}; do >+ setup_profile_vars $_profile >+ run_rc_command "${rc_arg}" >+ done >+} >+ >+stop_profiles() >+{ >+ unset stop_cmd >+ for _profile in ${openvpn_profiles}; do >+ setup_profile_vars $_profile >+ run_rc_command "${rc_arg}" >+ done >+} >+ >+status_profiles() >+{ >+ unset status_cmd >+ for _profile in ${openvpn_profiles}; do >+ setup_profile_vars $_profile >+ run_rc_command "${rc_arg}" >+ done >+} >+ >+reload_profiles() >+{ >+ unset reload_cmd >+ for _profile in ${openvpn_profiles}; do >+ setup_profile_vars $_profile >+ run_rc_command "${rc_arg}" >+ done >+} >+ > # support SIGHUP to reparse configuration file > extra_commands="reload" > >@@ -93,11 +157,32 @@ > stop_postcmd="stop_postcmd" > > load_rc_config ${name} >+ > : ${openvpn_enable="NO"} > : ${openvpn_flags=""} > : ${openvpn_if=""} >+: ${openvpn_configdir="${prefix}/etc/openvpn"} > : ${openvpn_configfile="${prefix}/etc/openvpn/openvpn.conf"} > : ${openvpn_dir="${prefix}/etc/openvpn"} >+: ${openvpn_profiles="default"} >+: ${openvpn_default_configfile="${openvpn_configfile}"} >+: ${openvpn_default_pidfile="${pidfile}"} >+ > required_files="${openvpn_configfile}" > command_args="--cd ${openvpn_dir} --daemon --config ${openvpn_configfile} --writepid ${pidfile}" >-run_rc_command "$1" >+ >+cmd="$1" >+if [ $# -gt 0 ]; then >+ shift >+fi >+ >+[ -n "$*" ] && openvpn_profiles="$*" >+ >+if [ -n "${openvpn_profiles}" -a "${openvpn_profiles}" != "default" ]; then >+ start_cmd="start_profiles" >+ stop_cmd="stop_profiles" >+ status_cmd="status_profiles" >+ reload_cmd="reload_profiles" >+fi >+ >+run_rc_command "$cmd"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 108371
:
74977
|
74978
|
74979
| 74980