initctl: don't fall back to default command for wrong commands
@@ -942,6 +942,9 @@ static int cmd_parse(int argc, char *argv[], struct cmd *command)
}
}
+ if (argv[0] && strlen(argv[0]) > 0)
+ errx(1, "No such command. See 'initctl help' for an overview of available commands.");
+
return command[0].cb(NULL); /* default cmd */
}
