Changed (startup) running mode so that startup_db is not overwritten.

This changes the upgrade semantics for running mode which will have to
be accounted for later.
This commit is contained in:
Olof hagsand 2019-03-12 09:56:09 +01:00
parent b54e6c1cc0
commit 932ca2e8ce
5 changed files with 51 additions and 63 deletions

View file

@ -671,11 +671,15 @@ main(int argc,
break;
case SM_RUNNING: /* Use running as startup */
/* Copy original running to startup and treat as startup */
if (xmldb_copy(h, "running", "startup") < 0)
if (xmldb_copy(h, "running", "tmp") < 0)
goto done;
case SM_STARTUP: /* Fall through */
ret = startup_mode_startup(h, "tmp", cbret);
if (ret2status(ret, &status) < 0)
goto done;
break;
case SM_STARTUP:
/* Load and commit from startup */
ret = startup_mode_startup(h, cbret);
ret = startup_mode_startup(h, "startup", cbret);
if (ret2status(ret, &status) < 0)
goto done;
/* if status = STARTUP_INVALID, cbret contains info */