FreeBSD Bugzilla – Attachment 203395 Details for
Bug 236944
security/strongswan: startup script improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch strongswan.in
strongswan.patch (text/plain), 3.23 KB, created by
Jose Luis Duran
on 2019-04-05 04:17:11 UTC
(
hide
)
Description:
Patch strongswan.in
Filename:
MIME Type:
Creator:
Jose Luis Duran
Created:
2019-04-05 04:17:11 UTC
Size:
3.23 KB
patch
obsolete
>diff --git Makefile Makefile >index 908c1b4..6f4f4bc 100644 >--- Makefile >+++ Makefile >@@ -3,7 +3,7 @@ > > PORTNAME= strongswan > PORTVERSION= 5.7.2 >-PORTREVISION= 2 >+PORTREVISION= 3 > CATEGORIES= security > MASTER_SITES= http://download.strongswan.org/ \ > http://download2.strongswan.org/ >diff --git files/strongswan.in files/strongswan.in >index 74e2f60..c4304db 100644 >--- files/strongswan.in >+++ files/strongswan.in >@@ -26,18 +26,15 @@ rcvar=strongswan_enable > load_rc_config $name > > : ${strongswan_enable:=NO} >-: ${strongswan_interface:="stroke"} >+strongswan_interface=${strongswan_interface:-"stroke"} > > extra_commands="reload statusall" > >-charon_command=%%PREFIX%%/libexec/ipsec/charon >-charon_pidfile=/var/run/charon.pid >-swanctl_command=%%PREFIX%%/sbin/swanctl >- > case $strongswan_interface in > [Ss][Tt][Rr][Oo][Kk][Ee]) > # "stroke" > command="%%PREFIX%%/sbin/ipsec" >+ > start_precmd=command_args=start > stop_cmd="${command} stop" > status_cmd="${command} status" >@@ -48,19 +45,20 @@ case $strongswan_interface in > [Vv][Ii][Cc][Ii]) > # "vici" > command=/usr/sbin/daemon >+ charon_command=%%PREFIX%%/libexec/ipsec/charon >+ charon_pidfile=/var/run/charon.pid >+ swanctl_command=%%PREFIX%%/sbin/swanctl > pidfile=/var/run/daemon-charon.pid > command_args="-S -P ${pidfile} ${charon_command} --use-syslog" > >- required_files=${charon_command} >- extra_commands="reload statusall" >- > start_postcmd=${name}_swanctl_poststart >- status_cmd="${swanctl_command} --stats" >+ status_cmd=${name}_swanctl_status >+ stop_postcmd="wait_charon stop" > reload_cmd=${name}_swanctl_reload > statusall_cmd=${name}_swanctl_statusall > ;; > >- *) >+*) > # "default" > warn "\$strongswan_interface setting is invalid - options supported are \"stroke\" or \"vici\"." > exit 1 >@@ -69,29 +67,61 @@ esac > > strongswan_swanctl_poststart() > { >- local _waitmax=5 >- >- # Need to wait for charon to finish startup, >- # else vici socket is unreadable >- while [ ! -f ${charon_pidfile} ] && [ ${_waitmax} -gt 0 ]; do >- sleep 1 >- _waitmax=$((_waitmax - 1)) >- done >+ wait_charon > > ${swanctl_command} --load-all --noprompt > } > > strongswan_swanctl_reload() > { >+ check_charon >+ > ${swanctl_command} --reload-settings > ${swanctl_command} --load-all --noprompt > } > >+strongswan_swanctl_status() >+{ >+ check_charon >+ >+ ${swanctl_command} --stats >+} >+ > strongswan_swanctl_statusall() > { >+ check_charon >+ > ${swanctl_command} --stats > ${swanctl_command} --list-conns > ${swanctl_command} --list-sas > } > >+check_charon() >+{ >+ if [ ! -e "${charon_pidfile}" ] >+ then >+ echo "${name} not running? (check ${charon_pidfile})." >&2 >+ exit 7 >+ fi >+} >+ >+wait_charon() >+{ >+ if [ "$1" = "stop" ] >+ then >+ charon_status="[ -f ${charon_pidfile} ]" >+ else >+ charon_status="[ ! -f ${charon_pidfile} ]" >+ fi >+ >+ local _waitmax=5 >+ >+ # Need to wait for charon, >+ # else vici socket is unreadable >+ while eval "${charon_status}" && [ ${_waitmax} -gt 0 ]; do >+ sleep 1 >+ _waitmax=$((_waitmax - 1)) >+ done >+} >+ > run_rc_command "$1" >diff --git pkg-descr pkg-descr >index 163408c..2fc49d1 100644 >--- pkg-descr >+++ pkg-descr >@@ -2,4 +2,4 @@ Strongswan is an open source IPsec-based VPN solution. > Strongswan for FreeBSD implements both the IKEv1 and IKEv2 (RFC 5996) key > exchange protocols. > >-WWW: http://www.strongswan.org >+WWW: https://www.strongswan.org
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 236944
:
203306
|
203395
|
203489
|
203887
|
204210
|
204703
|
208097
|
208247