* Added xml_wrap function that adds an XML node above a node as a wrapper

* also renamed `xml_insert` to `xml_wrap_all`.
* Added `clicon_argv_get()` function to get the user command-line options, ie the args in `-- <args>`. This is an alternative to using them passed to `plugin_start()`.
This commit is contained in:
Olof hagsand 2019-03-27 16:04:14 +01:00
parent 8624be0a67
commit 6ff36a2894
9 changed files with 642 additions and 54 deletions

View file

@ -304,15 +304,16 @@ startup_failsafe(clicon_handle h)
if ((ret = xmldb_exists(h, db)) < 0)
goto done;
if (ret == 0){ /* No it does not exist, fail */
clicon_err(OE_DB, 0, "No failsafe database");
clicon_err(OE_DB, 0, "Startup failed and no Failsafe database found, exiting");
goto done;
}
if ((ret = candidate_commit(h, db, cbret)) < 0) /* diff */
goto done;
if (ret == 0){
clicon_err(OE_DB, 0, "Failsafe database validation failed %s", cbuf_get(cbret));
clicon_err(OE_DB, 0, "Startup failed, Failsafe database validation failed %s", cbuf_get(cbret));
goto done;
}
clicon_log(LOG_NOTICE, "Startup failed, Failsafe database loaded ");
retval = 0;
done:
if (cbret)