swanctl: Avoid conflict between --uninstall and --uri

Also update the man page (including the -V change in the previous commit
and documenting the global options).
This commit is contained in:
Tobias Brunner
2026-02-23 11:24:44 +01:00
parent 3141a5fc4f
commit 357296a4d4
2 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ static int install(vici_conn_t *conn)
static void __attribute__ ((constructor))reg_uninstall() static void __attribute__ ((constructor))reg_uninstall()
{ {
command_register((command_t) { command_register((command_t) {
uninstall, 'u', "uninstall", "uninstall a trap or shunt policy", uninstall, 'U', "uninstall", "uninstall a trap or shunt policy",
{"--child <name> [--ike <name>] [--raw|--pretty]"}, {"--child <name> [--ike <name>] [--raw|--pretty]"},
{ {
{"help", 'h', 0, "show usage information"}, {"help", 'h', 0, "show usage information"},
+13 -3
View File
@@ -49,7 +49,7 @@ redirect an IKE_SA
.B "\-p, \-\-install" .B "\-p, \-\-install"
install a trap or shunt policy install a trap or shunt policy
.TP .TP
.B "\-u, \-\-uninstall" .B "\-U, \-\-uninstall"
uninstall a trap or shunt policy uninstall a trap or shunt policy
.TP .TP
.B "\-l, \-\-list\-sas" .B "\-l, \-\-list\-sas"
@@ -100,10 +100,20 @@ flush cached certificates
.B "\-r, \-\-reload\-settings" .B "\-r, \-\-reload\-settings"
reload strongswan.conf(5) configuration reload strongswan.conf(5) configuration
.TP .TP
.B "\-v, \-\-version" .B "\-V, \-\-version"
show daemon version information show daemon version information
.TP .TP
.B "\-h, \-\-help" .B "\-h, \-\-help"
show usage information show usage, version and plugin information
.SH GENERAL OPTIONS
.TP
.B "\-v, \-\-debug"
set debug level, default: 1
.TP
.B "\-+, \-\-options"
read command line options from file
.TP
.B "\-u, \-\-uri"
service URI to connect to
.SH SEE ALSO .SH SEE ALSO
.BR swanctl.conf (5) .BR swanctl.conf (5)