command line: prevent incomplete migration of context

"--migrate @<context name>" would have happily migrated the non-peer
properties, but would not copy the peers inside that context. Wasn't
needed so far, but shouldn't have been allowed either.
This commit is contained in:
Patrick Ohly 2011-01-10 15:51:10 +01:00
parent a95046fdca
commit 543ec4b4d8
1 changed files with 7 additions and 0 deletions

View File

@ -606,6 +606,13 @@ bool Cmdline::run() {
}
}
// cannot migrate context configs at the moment;
// will have to copy all peers inside it, too
if (!from->hasPeerProperties()) {
m_err << "ERROR: migrating context config '" << m_server << "' not implemented." << endl;
return false;
}
int counter = 0;
string oldRoot = from->getRootPath();
string suffix;