From: darkcoven Date: Wed, 2 Apr 2014 21:47:39 +0000 (+0200) Subject: Cli: do not force to be logged in batch mode X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ef331558ee79541964e56c4c30370d72c65d2b6e;p=ngadmin Cli: do not force to be logged in batch mode --- 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) {