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 }
(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.