forked from Mirror/frr
watchfrr: print specific error for removed options
... and document them in the man page. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
64a249ad9e
commit
999f153ece
|
@ -127,6 +127,20 @@ Display the version information and exit.
|
||||||
.TP
|
.TP
|
||||||
.BR \-h ", " \-\-help
|
.BR \-h ", " \-\-help
|
||||||
Display the usage information and exit.
|
Display the usage information and exit.
|
||||||
|
.SH PREVIOUS OPTIONS
|
||||||
|
Prior versions of \fBwatchfrr\fR supported some additional options that no
|
||||||
|
longer exist:
|
||||||
|
.IP
|
||||||
|
.BR \-a ,\ \-A ,\ \-e ,\ \-R ,\ \-z
|
||||||
|
.PP
|
||||||
|
The \fB-a\fR, \fB-A\fR and \fB-R\fR options were used to select alternate
|
||||||
|
monitoring modes that offered different patterns of restarting daemons. The
|
||||||
|
"correct" mode (phased restart) is now the default. The \fB-e\fR and \fB-z\fR
|
||||||
|
options used to disable some monitoring aspects, watchfrr now always has all
|
||||||
|
monitoring features enabled.
|
||||||
|
.PP
|
||||||
|
Removing these options should result in correct operation, if it does not
|
||||||
|
please file a bug report.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR zebra (8),
|
.BR zebra (8),
|
||||||
.BR bgpd (8),
|
.BR bgpd (8),
|
||||||
|
|
|
@ -964,6 +964,8 @@ FRR_DAEMON_INFO(watchfrr, WATCHFRR,
|
||||||
|
|
||||||
.privs = &watchfrr_privs, )
|
.privs = &watchfrr_privs, )
|
||||||
|
|
||||||
|
#define DEPRECATED_OPTIONS "aAezR:"
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int opt;
|
int opt;
|
||||||
|
@ -977,10 +979,18 @@ int main(int argc, char **argv)
|
||||||
frr_preinit(&watchfrr_di, argc, argv);
|
frr_preinit(&watchfrr_di, argc, argv);
|
||||||
progname = watchfrr_di.progname;
|
progname = watchfrr_di.progname;
|
||||||
|
|
||||||
frr_opt_add("b:dk:l:i:p:r:S:s:t:T:", longopts, "");
|
frr_opt_add("b:dk:l:i:p:r:S:s:t:T:" DEPRECATED_OPTIONS, longopts, "");
|
||||||
|
|
||||||
gs.restart.name = "all";
|
gs.restart.name = "all";
|
||||||
while ((opt = frr_getopt(argc, argv, NULL)) != EOF) {
|
while ((opt = frr_getopt(argc, argv, NULL)) != EOF) {
|
||||||
|
if (opt && opt < 128 && strchr(DEPRECATED_OPTIONS, opt)) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"The -%c option no longer exists.\n"
|
||||||
|
"Please refer to the watchfrr(8) man page.\n",
|
||||||
|
opt);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue