On 24/03/2022 09:03, Ercolino de Spiacico wrote:
The relevant code looks like:
if (testmode)
{
fprintf(stderr, "dnsmasq: %s.\n", _("syntax check OK"));
exit(0);
}
So it's not an accident, but the reason it's like that is rather lost
in the mists of time.
Can you t
The relevant code looks like:
if (testmode)
{
fprintf(stderr, "dnsmasq: %s.\n", _("syntax check OK"));
exit(0);
}
So it's not an accident, but the reason it's like that is rather lost in
the mists of time.
Can you take advantage of the fact that the exit code is zero
On 23/03/2022 21:02, Ercolino de Spiacico wrote:
It seems like "dnsmasq --test" redirects the output "syntax check OK"
message to stderr (2) by default:
root@sparrow:/tmp# dnsmasq --test
dnsmasq: syntax check OK.
root@sparrow:/tmp# dnsmasq --test 1>/dev/null
dnsmasq: syntax check OK.
root@s
It seems like "dnsmasq --test" redirects the output "syntax check OK"
message to stderr (2) by default:
root@sparrow:/tmp# dnsmasq --test
dnsmasq: syntax check OK.
root@sparrow:/tmp# dnsmasq --test 1>/dev/null
dnsmasq: syntax check OK.
root@sparrow:/tmp# dnsmasq --test 2>/dev/null
root@sparrow: