mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 17:18:56 +00:00
vtysh: 'x not running' redux
when warning about daemons that are not running, make sure to handle the multi instance case Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
e74339e235
commit
2a19199407
@ -423,12 +423,20 @@ static int vtysh_execute_func(const char *line, int pager)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmd_stat = CMD_SUCCESS;
|
cmd_stat = CMD_SUCCESS;
|
||||||
|
struct vtysh_client *vc;
|
||||||
for (i = 0; i < array_size(vtysh_client); i++) {
|
for (i = 0; i < array_size(vtysh_client); i++) {
|
||||||
if (cmd->daemon & vtysh_client[i].flag) {
|
if (cmd->daemon & vtysh_client[i].flag) {
|
||||||
if (vtysh_client[i].fd < 0
|
if (vtysh_client[i].fd < 0
|
||||||
&& (cmd->daemon == vtysh_client[i].flag)) {
|
&& (cmd->daemon == vtysh_client[i].flag)) {
|
||||||
fprintf(stderr, "%s is not running\n",
|
bool any_inst = false;
|
||||||
vtysh_client[i].name);
|
for (vc = &vtysh_client[i]; vc;
|
||||||
|
vc = vc->next)
|
||||||
|
any_inst = any_inst
|
||||||
|
|| (vc->fd > 0);
|
||||||
|
if (!any_inst)
|
||||||
|
fprintf(stderr,
|
||||||
|
"%s is not running\n",
|
||||||
|
vtysh_client[i].name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
cmd_stat = vtysh_client_execute(
|
cmd_stat = vtysh_client_execute(
|
||||||
|
Loading…
Reference in New Issue
Block a user