Commit 80a24b8c authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Retire ntpq's -O option. It's unclear how to do it right.

parent 0cc63af6
......@@ -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
......@@ -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
quiet = not (not varlist) # nonempty?
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, quiet)
self.printvars(variables, type, not (not varlist))
return True
# Unexposed helper tables and functions end here
......@@ -1490,7 +1483,6 @@ USAGE: ntpq [-46dphinOV] [-c str] [-D lvl] [ host ...]
-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__':
(options, arguments) = getopt.getopt(sys.argv[1:],
["ipv4","ipv6", "command",
"debug", "set-debug-level",
"help", "interactive", "numeric",
"old-rv", "peers", "version",
"peers", "version",
except getopt.GetoptError as 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"):
elif switch in ("-V", "--version"):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment