On Tue, Jan 04, 2022 at 03:34:53PM +0100, Martin Kletzander wrote:
On Tue, Jan 04, 2022 at 01:56:08PM +0000, Richard W.M. Jones wrote:
>somehow try to detect if the binary is not using syslog.
>
I tried various ways and I can't think of anything else than just trying
to run something that will fail like this and then skip the test if it
failed.
OK let's try this then ...
$ nbd-server -d -C /dev/null 0 /dev/null </dev/null 2>&1 >/dev/null |
grep -sq "Error: inetd mode requires syslog"
This command will exit with 0 if the binary doesn't support syslog and
with 1 if the binary does support syslog (grep -v to reverse this).
I'll see if I can come up with a patch.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html