aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ck.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ck.c b/src/ck.c
index 8aeb6d1..96ddeae 100644
--- a/src/ck.c
+++ b/src/ck.c
@@ -44,12 +44,13 @@ int main(int argc, char *argv[]) {
if (parse_action(argc, argv, &opt)) {
goto error;
}
- /* If the action is init don't load the config, skip to running init*/
- if (opt.action != CKA_INIT) {
+ /* If the action is init or help don't load the config, skip to running it*/
+ if (opt.action != CKA_INIT &&
+ opt.action != CKA_HELP) {
/* If the db doesn't exist ck is not initialized in the config
* location specified in opt */
if (!db_exists(&opt)) {
- ERR("ck is not initialized in %s.\nRun ck init first.\n", opt.confDir);
+ ERR("ck is not initialized in %s.\nRun ck init first.", opt.confDir);
goto error;
}
/* Finally parse the config file and exit on error */