From ef331558ee79541964e56c4c30370d72c65d2b6e Mon Sep 17 00:00:00 2001 From: darkcoven Date: Wed, 2 Apr 2014 23:47:39 +0200 Subject: [PATCH] Cli: do not force to be logged in batch mode --- cli/src/admin.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cli/src/admin.c b/cli/src/admin.c index ffc567f..1144c45 100644 --- a/cli/src/admin.c +++ b/cli/src/admin.c @@ -326,21 +326,15 @@ int main (int argc, char **argv) if (mac != NULL && pre_login(mac, retries) != 0) goto end; - if (batch) { - /* in batch mode, we must be logged to continue */ - if (ngadmin_getCurrentSwitch(nga) == NULL) { - printf("must be logged\n"); - goto end; - } - } else { #ifdef HAVE_LIBREADLINE + if (!batch) { /* initialize readline functions */ rl_attempted_completion_function = my_completion; rl_completion_entry_function = my_generator; sigsetjmp(jmpbuf, 1); -#endif } +#endif main_loop_continue = 1; while (main_loop_continue) { -- 2.39.5