Enhancement - config command

- Added validation of rc.annotations and rc.default.priority to the config
  command.
This commit is contained in:
Paul Beckingham 2010-01-23 00:12:34 -05:00
parent 4025488cf8
commit 545013e839
3 changed files with 23 additions and 2 deletions

View file

@ -708,6 +708,27 @@ int handleConfig (std::string &outs)
// TODO Check for referenced but missing theme files.
// TODO Check for referenced but missing string files.
// Check for bad values in rc.annotations.
std::string annotations = context.config.get ("annotations");
if (annotations != "full" &&
annotations != "sparse" &&
annotations != "none")
out << "Configuration error: annotations contains an unrecognized value '"
<< annotations
<< "'."
<< std::endl;
// Check for bad values in rc.default.priority.
std::string defaultPriority = context.config.get ("default.priority");
if (defaultPriority != "H" &&
defaultPriority != "M" &&
defaultPriority != "L" &&
defaultPriority != "")
out << "Configuration error: default.priority contains an unrecognized value '"
<< defaultPriority
<< "'."
<< std::endl;
// Verify installation. This is mentioned in the documentation as the way to
// ensure everything is properly installed.