mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
bectl: Simplify command aliases.
MFC after: 3 days
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D44406
(cherry picked from commit a46217ce7d)
This commit is contained in:
parent
98a9731683
commit
d5d2452bf5
1 changed files with 2 additions and 7 deletions
|
|
@ -115,7 +115,9 @@ static struct command_map_entry command_map[] =
|
|||
{ "mount", bectl_cmd_mount, false },
|
||||
{ "rename", bectl_cmd_rename, false },
|
||||
{ "unjail", bectl_cmd_unjail, false },
|
||||
{ "ujail", bectl_cmd_unjail, false },
|
||||
{ "unmount", bectl_cmd_unmount, false },
|
||||
{ "umount", bectl_cmd_unmount, false },
|
||||
{ "check", bectl_cmd_check, true },
|
||||
};
|
||||
|
||||
|
|
@ -571,13 +573,6 @@ main(int argc, char *argv[])
|
|||
optreset = 1;
|
||||
optind = 1;
|
||||
|
||||
/* Handle command aliases */
|
||||
if (strcmp(command, "umount") == 0)
|
||||
command = "unmount";
|
||||
|
||||
if (strcmp(command, "ujail") == 0)
|
||||
command = "unjail";
|
||||
|
||||
if ((cmd = get_cmd_info(command)) == NULL) {
|
||||
fprintf(stderr, "Unknown command: %s\n", command);
|
||||
return (usage(false));
|
||||
|
|
|
|||
Loading…
Reference in a new issue