[chrony-dev] Testing for option -N support

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


Hi Devs,

With the new -N option added in development, there may be cases where web interface frontends may want to use "chronyc -N sources" when chronyc supports it.

As a test for -N, I first tried... 

chronyc -N --version >/dev/null 2>&1

but looking at the code, --version is handled before the -N and always returns 0, then I tried

chronyc -N -v >/dev/null 2>&1

works fine.

The resulting one-liner:
--
ARG="" ; chronyc -N -v >/dev/null 2>&1 && ARG="-N" ; chronyc $ARG sources
--

Lonnie


--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/