FreeBSD Bugzilla – Attachment 176669 Details for
Bug 207129
security/tor: Request to add multi-instance support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch improving instance messages and error codes
tor.patch (text/plain), 2.07 KB, created by
Yuri Victorovich
on 2016-11-05 22:53:58 UTC
(
hide
)
Description:
Patch improving instance messages and error codes
Filename:
MIME Type:
Creator:
Yuri Victorovich
Created:
2016-11-05 22:53:58 UTC
Size:
2.07 KB
patch
obsolete
>Index: security/tor/Makefile >=================================================================== >--- security/tor/Makefile (revision 425446) >+++ security/tor/Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= tor > PORTVERSION= 0.2.8.9 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= security net ipv6 > MASTER_SITES= TOR > >Index: security/tor/files/tor.in >=================================================================== >--- security/tor/files/tor.in (revision 425446) >+++ security/tor/files/tor.in (working copy) >@@ -30,6 +30,7 @@ > > name="tor" > rcvar=tor_enable >+exit_code=0 > > load_rc_config ${name} > >@@ -44,11 +45,11 @@ > > instance=${2} > if [ -n "${instance}" ]; then >- # extended instance: parameters are set explicitly > inst_def=${instance} > inst_name=${inst_def%%:*} > inst_def=${inst_def#$inst_name} > if [ -n "$inst_def" ]; then >+ # extended instance: parameters are set explicitly > inst_def=${inst_def#:} > tor_conf=${inst_def%%:*} > inst_def=${inst_def#$tor_conf:} >@@ -59,7 +60,7 @@ > tor_pidfile=${inst_def%%:*} > tor_datadir=${inst_def#$tor_pidfile:} > if [ -z "${tor_conf}" -o -z "${tor_user}" -o -z "${tor_group}" -o -z "${tor_pidfile}" -o -z "${tor_datadir}" ]; then >- warn "invalid tor instance ${inst_name} settings" >+ warn "invalid tor instance ${inst_name} settings: ${instance}" > exit 1 > fi > else >@@ -83,9 +84,13 @@ > > if [ -z "${instance}" -a -n "${tor_instances}" ]; then > for i in ${tor_instances}; do >- %%PREFIX%%/etc/rc.d/tor $1 ${i} || warn "$1 failed for the tor instance $i" >+ echo -n "${name} instance ${i%%:*}: " >+ if ! %%PREFIX%%/etc/rc.d/tor $1 ${i}; then >+ exit_code=1 >+ fi > done >- checkyesno tor_disable_default_instance && return 0 >+ checkyesno tor_disable_default_instance && return $exit_code >+ echo -n "${name} main instance: " > fi > > required_files=${tor_conf} >@@ -95,5 +100,8 @@ > command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir}" > extra_commands="reload" > >-run_rc_command "$1" >+if ! run_rc_command "$1"; then >+ exit_code=1 >+fi > >+return $exit_code
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
Flags:
yuri
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 207129
:
176091
|
176094
|
176109
|
176120
|
176123
|
176124
|
176150
|
176669
|
176703