DOC: management: clarify usage of -V with -c
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 11 Aug 2025 14:19:17 +0000 (16:19 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Oct 2025 13:41:54 +0000 (15:41 +0200)
In ticket #3065 an user complained that no success message is printed
anymore when using -c. The message does not appear by default since
version 2.9. This patch clarify the documentation.

Must be backported as far as 2.8.

(cherry picked from commit f4f93c56c17165e7098dc98cecf49e656e57afff)
Signed-off-by: William Lallemand <wlallemand@haproxy.com>
(cherry picked from commit d650878491600e281bf1ea15b378237d28e50b69)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 1c67ac3c0a579f335a0a7c581e409d4be1122e8e)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

doc/management.txt

index bafe8d2..7e0a760 100644 (file)
@@ -197,6 +197,12 @@ list of options is :
   -c : only performs a check of the configuration files and exits before trying
     to bind. The exit status is zero if everything is OK, or non-zero if an
     error is encountered. Presence of warnings will be reported if any.
+    By default this option does not report a success message. Combined with
+    "-V" this will print the message "Configuration file is valid" upon
+    success.
+
+    Scripts must use the exit status to dertermine the success of the
+    command.
 
   -cc : evaluates a condition as used within a conditional block of the
     configuration. The exit status is zero if the condition is true, 1 if the