[Unbound-users] option to make unbound-control quiet
W.C.A. Wijngaards
wouter at nlnetlabs.nl
Thu Sep 27 09:33:22 UTC 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Mariano,
On 09/22/2012 10:08 PM, Mariano Absatz - gmail wrote:
> Hi,
>
> I use unbound-control locally to reopen the log file after I rotate
> the logs using logrotate. The problem is that when unbound-control
> does contact the server and gets it to do what it wants, it prints
> "ok" on stdout.
>
> This is annoying if you invoke it from within logrotate or a cron
> file. I know, I can add ">/dev/null" (this is what I did), but it
> is usually nice to have an option to tell any program to not output
> anything unless there is an error.
>
> Using the attached patch, you use the "-q" (quiet) option so that
> unbound-control doesn't print anything if everything went OK.
>
> Since it's been decades since the last time I seriously wrote C
> code, my patch is ugly (I don't like it that it is a really inner
> function the one that prints the output and I don't completely
> understand the argc/argv management within go() and go_cmd(), so I
> ended adding one more parameter in the functions.
>
> Maybe someone who can actually code is able to do it right :)
Thank you for the patch, I have applied it to the svn code repository
for the next version.
Best regards,
Wouter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iQIcBAEBAgAGBQJQZB1iAAoJEJ9vHC1+BF+Nml4QAI9BTBkECB+tAywKhTFrOQWv
mNS07zIfD8JZ+Kjsr7gC63MktkwZKCy8QjBcEBIJN59PRjJ31I3s2q25iR+4mahM
s/CSGZJcx5MP+un3GuVElZ1DaS7AsqF6k8Dr2lhhmkv+tljzQJ7aT+VSjg4mcwTs
KV3HUcyke2h7wfn7n0ACE228/6MkAlwEtoB60yCaW+srRTgK6BDRSJ8YGbW9EMRW
cB9gdc2xAF6pvrtkQW61bsomJtRL7PyA47q7Y7iMU8pWr4qymF0ns9ehy9ySWbPH
eO+UwcGfXibA0MMt27WmRT4f5S3iHS/9HY3+te8Mx22U2musqcyWzUWQmZkIA3Tb
BPduHi/CeyW6aGS7AmCLS3tBScEr9WSFO+gSbbi3chm7WIJzg4Y06BVL7ZhtMbA7
pm1EQBaQXM6KPfHa2t+T8dFNN7UVZLt5qcxblguUfybOkCp8IkSVc9OczzMcF76+
zd8H/JVNN8cDXopn/JSQnTWTqKpRD2ru/BJEi0QXGeJUQsXesTZHR8Au85hbZgFD
c6A3TvDOln1pLQpkDTLg+RJvghoPDFJcqgLdYHkdS/eIDs7z4Sp4Si8ltsdafe9M
gxe1zT40idp2Yhj/hM6i2ehk9n9CHGghW2zXre5nl0ktVA14tN28AE30bFN/a8c2
zh27aQd11b1Ja6Nk+uzG
=bJ/z
-----END PGP SIGNATURE-----
More information about the Unbound-users
mailing list