Summary: | net-vpn/tor - /etc/init.d/tor should show what is actually wrong with config on checkconfig | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | 3uklz9+cwyw433xfnykw |
Component: | Current packages | Assignee: | John Helmert III <ajak> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | sam, vargad88 |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Change tor init script not redirect tor check config output to /dev/null |
Description
3uklz9+cwyw433xfnykw
2019-01-06 09:43:55 UTC
(In reply to 3uklz9+cwyw433xfnykw from comment #0) > Currently /etc/init.d/tor checkconfig only says that config is invalid, and > hides what the problem is into /dev/null. It would be much easier to fix the > problem if the user can see what is wrong. I suggest the following > enhancement to /etc/init.d/tor: > > checkconfig() { > problems="$(${command} --verify-config --hush)" > if [ $? -ne 0 ] ; then > eerror "Tor configuration (/etc/tor/torrc) is not valid." > eerror "Example is in /etc/tor/torrc.sample" > eerror "$problems" > return 1 > fi > } looks good to me. do you want to prepare a patch with your name as the author so i can properly attribute it to you. if you feel comforatable, use github. I'd love to but current GLEP 76: Copyright Policy requires real name for commits and I cannot provide that. :-( I can make a patch file, but is it of any use from anonymous donor? Or should anonymous entities just point out bugs without suggesting fixes? Created attachment 869062 [details, diff]
Change tor init script not redirect tor check config output to /dev/null
I run into this issue myself. I think it should be okay not to redirect the output to null, as it's done for other daemons. I tested this change myself, it only writes to output if there was an error in the configuration. Please see attached patch.
|