A single patch which adds the new configtest subcommand, plus a fixup
for a formatting issue which was noticed only after the branch had
already been merged to next.
* refs/heads/t/configtest:
show_subcommand_summary(): Increase column width.
New subcommand: configtest.
lopsub must be installed to compile this package. Also help2man is
no longer required since lopsub has built-in roff support.
+ - New subcommand "configtest" to check the command line options and
+ the configuration file for syntactic correctness.
+
- "make install" will install the executable and the man page.
- In run mode, dss no longer exits successfully if another instance
}
EXPORT_CMD_HANDLER(ls);
+static int com_configtest(void)
+{
+ printf("Syntax Ok\n");
+ return 0;
+}
+EXPORT_CMD_HANDLER(configtest);
+
static int setup_signal_handling(void)
{
int ret;
for (i = 1; (cmd = lls_cmd(i, dss_suite)); i++) {
const char *name = lls_command_name(cmd);
const char *purpose = lls_purpose(cmd);
- printf("%-10s%s\n", name, purpose);
+ printf("%-11s%s\n", name, purpose);
}
exit(EXIT_SUCCESS);
}
Sending SIGHUP causes the running dss process to reload its config file.
[/help]
+[subcommand configtest]
+ purpose = run a configuration file syntax test
+ [description]
+ This command checks the command line options and the configuration
+ file for syntactic correctness. It either reports "Syntax Ok" and
+ exits successfully or prints information about the first syntax error
+ detected and terminates with exit code 1.
+ [/description]
[section copyright]
Written by Andre Noll