Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 63607 Details for
Bug 98420
openvpn initsript doesn't wait until the vpn is completly up
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
even newer version
openvpn-initscript.patch (text/plain), 1.80 KB, created by
Nikolas Garofil
on 2005-07-17 05:22:39 UTC
(
hide
)
Description:
even newer version
Filename:
MIME Type:
Creator:
Nikolas Garofil
Created:
2005-07-17 05:22:39 UTC
Size:
1.80 KB
patch
obsolete
>*** /etc/init.d/openvpn 2005-07-17 13:07:02.000000000 +0200 >--- /etc/init.d/openvpnNEW 2005-07-17 12:59:01.000000000 +0200 >*************** >*** 1,6 **** >--- 1,8 ---- > #!/sbin/runscript > > VPNDIR="/etc/openvpn" >+ PINGTRIES=5 >+ PINGSATRIE=3 > > depend() { > need net >*************** >*** 34,42 **** >--- 36,67 ---- > --startas /usr/sbin/openvpn -- --config ${VPN}/local.conf \ > --writepid /var/run/openvpn-${VPN}.pid \ > --daemon --cd ${VPN} >+ COMPLETELYUP=1 #not tested so not completly up > eend $? > else > einfo "Connection ${VPN} already online. Skipping..." >+ COMPLETELYUP=0 #already up and tested >+ fi >+ >+ CONNECTIONTESTS=0 #this var contains the number of times the connection has been tested >+ while [[ ${COMPLETELYUP} -gt 0 ]] && [[ ${CONNECTIONTESTS} -lt ${PINGTRIES} ]]; do # after 5 tests I give up >+ if [ -f ${VPN}/onlinecheck ]; then >+ ping -c ${PINGSATRIE} `head -n 1 ${VPN}/onlinecheck` >& /dev/null >+ sleep 1 >+ COMPLETELYUP=$? >+ CONNECTIONTESTS=`expr ${CONNECTIONTESTS} + 1` >+ else >+ einfo "${VPNDIR}/${VPN}/onlinecheck does not exist" >+ einfo "If you create this file and place the hostname or IP of a system in it that is" >+ einfo "only reachable when the vpn is up then this initscript will ping that system to" >+ einfo "test the connection. This will be tried with ${PINGTRIES} times ${PINGSATRIE} pings" >+ einfo "with 1 second between each of the ${PINGTRIES} times ${PINGSATRIE} pings." >+ COMPLETELYUP=`true` >+ fi >+ done >+ if [[ ${COMPLETELYUP} -gt 0 ]]; then >+ ewarn "Openvpn started without problems but the host in" >+ ewarn "${VPNDIR}/${VPN}/onlinecheck is unavailable." > fi > else > ewarn "Expected ${VPNDIR}/${VPN} to be a directory containing a local.conf."
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 98420
:
62978
|
63079
|
63607
|
63640