mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 05:18:47 +00:00
Merge pull request #1195 from qlyoung/vtysh-warn-not-running
vtysh: warn on cli targeting non-running daemon
This commit is contained in:
commit
3fabacd286
@ -425,6 +425,12 @@ static int vtysh_execute_func(const char *line, int pager)
|
|||||||
cmd_stat = CMD_SUCCESS;
|
cmd_stat = CMD_SUCCESS;
|
||||||
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
|
||||||
|
&& (cmd->daemon == vtysh_client[i].flag)) {
|
||||||
|
fprintf(stderr, "%s is not running\n",
|
||||||
|
vtysh_client[i].name);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
cmd_stat = vtysh_client_execute(
|
cmd_stat = vtysh_client_execute(
|
||||||
&vtysh_client[i], line, fp);
|
&vtysh_client[i], line, fp);
|
||||||
if (cmd_stat != CMD_SUCCESS)
|
if (cmd_stat != CMD_SUCCESS)
|
||||||
|
Loading…
Reference in New Issue
Block a user