[Nagiosplug-devel] [Nagiosplug-checkins] nagiosplug/plugins check_by_ssh.c, 1.41, 1.42

Holger Weiss holger at CIS.FU-Berlin.DE
Tue Apr 17 17:04:10 CEST 2007


* Andreas Ericsson <ae at op5.se> [2007-04-17 15:24]:
> Holger Weiss wrote:
> > Update of /cvsroot/nagiosplug/nagiosplug/plugins
> > In directory sc8-pr-cvs16:/tmp/cvs-serv13836/plugins
> >
> > Modified Files:
> > 	check_by_ssh.c
> > Log Message:
> > Up to revision 1.35, the "-S" option skipped the specified number of
> > lines written to stderr.  With revision 1.36 and newer, "-S" skipped the
> > specified number of lines written to stdout.  Now, "-S" skips the
> > specified number of lines written to stderr; and if the number specified
> > via "-S" minus the number of lines written to stderr is larger than 0,
> > the difference is used as the number of lines written to stdout to skip.
> > Also, the "--help" output was fixed.  (Hector - 1675286) 
>
> So.. If --skip=10 is used, and there's 7 lines of output on stderr, the first
> 3 lines of stdout are skipped?

Yes.

> Why not just keep "--skiplines" as-is

You mean keep it as it was up to r1.35 ("--skip-stderr") or between
r1.36 and r1.41 ("--skip-stdout")?

> and introduce --skip-stderr and --skip-stdout, which would solve the
> same problem in a more intuitive way, not break backwards-compatibility
> *and* provide a finer granularity.

Well, the problem I tried to fix was that we *did* break backwards
compatibility with releases <= 1.4.2 and users complained about that.
My idea was to make things somewhat compatible with both the old and the
new behaviour.  However, I agree that the result really seems too
clumsy, especially as it doesn't provide real backwards compatibility
anyway.  Actually, I thought about reverting that in favour of the
options you suggested myself.  Convinced, will do.

> When specified without options, they should skip ALL output on the targeted
> fd.

Yes.

Thanks, Holger

-- 
PGP fingerprint:  F1F0 9071 8084 A426 DD59  9839 59D3 F3A1 B8B5 D3DE




More information about the Devel mailing list