@@ -100,7 +100,7 @@ void configure(const std::string& file_name) {
if (rcode != 0) {
string reason = "";
if (comment) {
- reason = string(" (") + comment->stringValue() + string(")");
+ reason = comment->stringValue();
}
LOG_ERROR(dhcp4_logger, DHCP4_CONFIG_LOAD_FAIL).arg(reason);
isc_throw(isc::BadValue, "Failed to apply configuration: " << reason);
@@ -97,6 +97,12 @@ main(int argc, char* argv[]) {
usage();
+ // Configuration file is required.
+ if (config_file.empty()) {
+ cerr << "Configuration file not specified." << endl;
+ usage();
+ }
+
int ret = EXIT_SUCCESS;
try {
@@ -103,7 +103,7 @@ void configure(const std::string& file_name) {
LOG_ERROR(dhcp6_logger, DHCP6_CONFIG_LOAD_FAIL).arg(reason);
isc_throw(isc::BadValue, "Failed to apply configuration:" << reason);