* Added: `CLICON_YANG_REGEXP, CLICON_CLI_TAB_MODE, CLICON_CLI_HIST_FILE, CLICON_CLI_HIST_SIZE, CLICON_XML_CHANGELOG, CLICON_XML_CHANGELOG_FILE`.
  * Renamed: `CLICON_XMLDB_CACHE` to `CLICON_DATASTORE_CACHE` and type changed.
  * Deleted: `CLICON_XMLDB_PLUGIN, CLICON_USE_STARTUP_CONFIG`;
* New clixon-lib@2019-06-05.yang revision
  * Added: ping rpc added (for liveness)
* Check cligen tab mode, dont start if CLICON_CLI_TAB_MODE is undefined
This commit is contained in:
Olof hagsand 2019-06-05 10:58:02 +02:00
parent dc45600074
commit d3c392b69d
7 changed files with 669 additions and 119 deletions

View file

@ -283,6 +283,7 @@ main(int argc, char **argv)
yang_stmt *yspecfg = NULL; /* For config XXX clixon bug */
struct passwd *pw;
char *str;
int tabmode;
/* Defaults */
once = 0;
@ -542,7 +543,11 @@ main(int argc, char **argv)
clicon_log(LOG_WARNING, "No such cli mode: %s (Specify cli mode with CLICON_CLI_MODE in config file or -m <mode> on command line", cli_syntax_mode(h));
/* CLIgen tab mode, ie how <tab>s behave */
cligen_tabmode_set(cli_cligen(h), clicon_cli_tab_mode(h));
if ((tabmode = clicon_cli_tab_mode(h)) < 0){
fprintf(stderr, "FATAL: CLICON_CLI_TAB_MODE not set\n");
goto done;
}
cligen_tabmode_set(cli_cligen(h), tabmode);
if (logclisyntax)
cli_logsyntax_set(h, logclisyntax);