From ecb01f37f4c5b88be752448ed1591abb63388e8d Mon Sep 17 00:00:00 2001 From: 31ldtsON <159769855+31ldtsON@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:48:35 +0100 Subject: [PATCH] B OpenNebula/one#6481: Modification on onecfg help (#2999) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in order not to show version parameter Signed-off-by: 31ldtsON Co-authored-by: Tino Vázquez (cherry picked from commit 5e2ed4685b423ccb3227a3b7b109d98f192e011a) --- src/onecfg/bin/onecfg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/onecfg/bin/onecfg b/src/onecfg/bin/onecfg index 072930973c..87b1c107fc 100755 --- a/src/onecfg/bin/onecfg +++ b/src/onecfg/bin/onecfg @@ -168,6 +168,9 @@ CommandParser::CmdParser.new(ARGV) do Apply changes to configuration files EOT + # Filter the options to exclude VERSION + options_without_version = CommandParser::OPTIONS.reject {|opt| opt[:name] == 'version' } + command :patch, patch_desc, [:file, nil], :options => [UNPRIVILEGED, @@ -175,7 +178,7 @@ CommandParser::CmdParser.new(ARGV) do PREFIX, PATCH_FORMAT, PATCH_ALL] + - CommandParser::OPTIONS + LOG_MODES \ + options_without_version + LOG_MODES \ do OneCfg::LOG.get_logger(options) rc = -1