[Git][NTPsec/ntpsec][master] 2 commits: Improve the ntpq help display.
Eric S. Raymond
gitlab at mg.gitlab.com
Tue Aug 22 10:47:32 UTC 2017
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
e2bc5e22 by Eric S. Raymond at 2017-08-22T06:41:30-04:00
Improve the ntpq help display.
- - - - -
5a561c40 by Eric S. Raymond at 2017-08-22T06:46:53-04:00
Typo fix.
- - - - -
2 changed files:
- docs/includes/ntpq-body.txt
- ntpclients/ntpq
Changes:
=====================================
docs/includes/ntpq-body.txt
=====================================
--- a/docs/includes/ntpq-body.txt
+++ b/docs/includes/ntpq-body.txt
@@ -553,15 +553,11 @@ The -O (--old-rv) option of legacy versions has been retired.
== Known Limitations ==
-It is possible for a "config unpeer" command to fail silently, yielding
+It is possible for a ":config unpeer" command to fail silently, yielding
"Config Succeeded", if it is given a peer identifier that looks like
a driver type name or a hostname not present in the peer list. The
error will however be reported in the system log.
-Any error messages from failed ":config" and "config-from-file" will have
-slightly confusing prefixes. This is due to a limitation in the Python
-Cmd.Cmd library and cannot practically be fixed.
-
The config command cannot be used to change a server's default restrictions.
include::mrufail.txt[]
=====================================
ntpclients/ntpq
=====================================
--- a/ntpclients/ntpq
+++ b/ntpclients/ntpq
@@ -169,6 +169,10 @@ class Ntpq(cmd.Cmd):
self.ai_family = socket.AF_UNSPEC
self.termwidth = ntp.util.termsize()[0]
+ def get_names(self):
+ # Overrides a method in Cmd
+ return [x.replace('hot_', ':').replace('config_from_file', 'config-from-file') for x in dir(self.__class__)]
+
def emptyline(self):
"Called when an empty line is entered in response to the prompt."
pass
@@ -1248,7 +1252,7 @@ usage: lopeers
except ntp.packet.ControlException as e:
self.warn(e.message + "\n")
- def help_config(self):
+ def help_hot_config(self):
self.say("""\
function: send a remote configuration command to ntpd
usage: config <configuration command line>
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/291407ea9e9e20f75b46912cf43ac9bc2ef107d6...5a561c40eeed165aac1109e4347df0b853d37aa0
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/291407ea9e9e20f75b46912cf43ac9bc2ef107d6...5a561c40eeed165aac1109e4347df0b853d37aa0
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170822/cd208dc1/attachment.html>
More information about the vc
mailing list