Skip to content
GitLab
Next
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
NTPsec
ntpsec
Commits
80a24b8c
Commit
80a24b8c
authored
Nov 08, 2016
by
Eric S. Raymond
Browse files
Retire ntpq's -O option. It's unclear how to do it right.
parent
0cc63af6
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/includes/ntpq-body.txt
View file @
80a24b8c
...
...
@@ -74,9 +74,6 @@ attempt to read interactive format commands from the standard input.
+-n+, +--numeric+::
Output all host addresses in numeric format rather than
converting to the canonical host names.
+-O+, +--old-rv+::
Print an extra line when reading a single value with rv,
for example +ntpq -O -c "rv 0 frequency"+
+-p+, +--peers+::
Print a list of the peers known to the server as well as a summary of
their state. This is equivalent to the +peers+ interactive command.
...
...
@@ -563,4 +560,6 @@ In older versions, the 'type' variable associated with a
reference clock was a numeric driver type index. It has been replaced
by 'name', a shortname for the driver type.
The -O (--old-rv) option of legacy versions has been retired.
// end
ntpq/ntpq
View file @
80a24b8c
...
...
@@ -140,7 +140,6 @@ class Ntpq(cmd.Cmd):
self
.
session
=
session
self
.
prompt
=
"ntpq> "
self
.
interactive
=
False
# set to True when we should prompt
self
.
old_rv
=
False
# use old readvars behavior?
#self.auth_keyid = 0 # Keyid used for authentication.
#self.auth_keytype = "NID_md5" # MD5 (FIXME: string value is a dummy)
#self.auth_hashlen = 16 # MD5
...
...
@@ -444,12 +443,6 @@ usage: help [ command ]
def
__dolist
(
self
,
varlist
,
associd
,
op
,
type
):
"List variables associated with a specified peer."
# if we're asking for specific variables don't include the
# status header line in the output.
if
self
.
old_rv
:
quiet
=
False
else
:
quiet
=
not
(
not
varlist
)
# nonempty?
try
:
variables
=
self
.
session
.
readvar
(
associd
,
varlist
,
op
)
except
Mode6Exception
as
e
:
...
...
@@ -471,7 +464,7 @@ usage: help [ command ]
return
True
if
not
quiet
:
self
.
say
(
"associd=%d "
%
associd
)
self
.
printvars
(
variables
,
type
,
quie
t
)
self
.
printvars
(
variables
,
type
,
not
(
not
varlis
t
)
)
return
True
# Unexposed helper tables and functions end here
...
...
@@ -1490,7 +1483,6 @@ USAGE: ntpq [-46dphinOV] [-c str] [-D lvl] [ host ...]
command
peers
-n no numeric numeric host addresses
-O no old-rv Always output status line with readvar
-V opt version Output version information and exit
-w no wide enable wide display of addresses
'''
...
...
@@ -1501,11 +1493,11 @@ if __name__ == '__main__':
try
:
(
options
,
arguments
)
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
"46c:dD:hin
O
pVw"
,
"46c:dD:hinpVw"
,
[
"ipv4"
,
"ipv6"
,
"command"
,
"debug"
,
"set-debug-level"
,
"help"
,
"interactive"
,
"numeric"
,
"old-rv"
,
"peers"
,
"version"
,
"peers"
,
"version"
,
"wide"
])
except
getopt
.
GetoptError
as
e
:
print
(
e
)
...
...
@@ -1534,8 +1526,6 @@ if __name__ == '__main__':
interpreter
.
interactive
=
True
elif
switch
in
(
"-n"
,
"--numeric"
):
interpreter
.
showhostnames
=
False
elif
switch
in
(
"-O"
,
"--old-rv"
):
interpreter
.
old_rv
=
True
elif
switch
in
(
"-p"
,
"--peers"
):
interpreter
.
ccmds
.
append
(
"peers"
)
elif
switch
in
(
"-V"
,
"--version"
):
...
...
Matt Selsky
@selsky
Mentioned in issue
#145 (closed)
·
Nov 09, 2016
Mentioned in issue
#145 (closed)
Mentioned in issue #145
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment