summaryrefslogtreecommitdiff
path: root/vtysh/vtysh_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'vtysh/vtysh_main.c')
-rw-r--r--vtysh/vtysh_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c
index 5bb3c61e52..3c46194d31 100644
--- a/vtysh/vtysh_main.c
+++ b/vtysh/vtysh_main.c
@@ -415,7 +415,10 @@ main (int argc, char **argv, char **env)
if (vtysh_connect_all (daemon_name) <= 0)
{
fprintf(stderr, "Exiting: failed to connect to any daemons.\n");
- exit(1);
+ if (no_error)
+ exit(0);
+ else
+ exit(1);
}
if (inputfile)