diff options
| author | Daniel Walton <dwalton@cumulusnetworks.com> | 2017-07-13 19:56:08 +0000 |
|---|---|---|
| committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2017-07-13 19:56:08 +0000 |
| commit | f1a05de982b2466907838a7e74d7d15ad4060db2 (patch) | |
| tree | a41d430cf69e6603accec78238c8d86d59a389ad /lib/if.c | |
| parent | 4b8197a4f7c1b510c7a0eadc64c78e78ff98f578 (diff) | |
vtysh: return non-zero for configuration failures
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
This allows frr-reload.py (or anything else that scripts via vtysh)
to know if the vtysh command worked or hit an error.
Diffstat (limited to 'lib/if.c')
| -rw-r--r-- | lib/if.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -693,7 +693,7 @@ DEFUN (interface, vty_outln (vty, "%% Interface name %s is invalid: length exceeds " "%d characters", ifname, INTERFACE_NAMSIZ); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } /*Pending: need proper vrf name based lookup/(possible creation of VRF) @@ -710,7 +710,7 @@ DEFUN (interface, if (!ifp) { vty_outln (vty, "%% interface %s not in %s", ifname, vrfname); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } VTY_PUSH_CONTEXT (INTERFACE_NODE, ifp); @@ -740,14 +740,14 @@ DEFUN_NOSH (no_interface, if (ifp == NULL) { vty_out (vty, "%% Interface %s does not exist%s", ifname, VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } if (CHECK_FLAG (ifp->status, ZEBRA_INTERFACE_ACTIVE)) { vty_out (vty, "%% Only inactive interfaces can be deleted%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } if_delete(ifp); |
