From 6e101bf809409b8a5868e915ef5c3a67cc185c46 Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Tue, 15 Oct 2019 11:40:48 +0200 Subject: [PATCH] TT#68710 Sort ngcpcfg actions alphabetically in ngcpcfg help Change-Id: Ibca41fe2d9cd5198eac6fdbbd09515f7f8e16d22 --- sbin/ngcpcfg | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/sbin/ngcpcfg b/sbin/ngcpcfg index c17a62d9..7b4474f4 100755 --- a/sbin/ngcpcfg +++ b/sbin/ngcpcfg @@ -40,51 +40,54 @@ usage() { printf "Usage: %s [] Actions: - check [] validate YAML configuration files + apply [] a short-cut for build-services-commit build [] generate/update configuration files - services [] execute service handlers for modified configuration files + check [] validate YAML configuration files + clean [] clean /etc/ngcp-config folder configs/templates (see available options) commit [] commit and record changes (without pushing) - apply [] a short-cut for build-services-commit + del [] delete YAML option from defined file diff [] display pending configuration changes - status [] display status of configuration file + get print key value from YAML configuration files + help display this help screen and exit + initialise initialise setup (to be executed only once on setup) log [] show log of config changes - show [] show latest config change (or if specified) - clean [] clean /etc/ngcp-config folder configs/templates (see available options) - set [] set YAML option in defined file - del [] delete YAML option from defined file patch [] create customtt files using patchtt and templates + services [] execute service handlers for modified configuration files + set [] set YAML option in defined file + show [] show latest config change (or if specified) + status [] display status of configuration file + values obsolete synonym for 'get' + version display program version and exit + " "$PN" # display only if ngcp-ngcpcfg-ha is available if [ -r /usr/share/ngcp-ngcpcfg/functions/ha_features ] ; then + printf "Actions (High Availability):\n" printf " push [] push modifications to other node(s) (shared storage setup only)\n" printf " push-parallel push modifications to other node(s) in parallel (shared storage setup only)\n" printf " pull retrieve modifications from shared storage (shared storage setup only)\n" + printf "\n" + fi + + + if [ -r /usr/share/ngcp-ngcpcfg/scripts/encrypt ] || \ + [ -r /usr/share/ngcp-ngcpcfg/scripts/init-mgmt ]; then + printf "Actions (extra):\n" fi # display only if ngcp-ngcpcfg-locker is available if [ -r /usr/share/ngcp-ngcpcfg/scripts/encrypt ] ; then - printf " encrypt encrypt /etc/ngcp-config and all resulting configuration files\n" printf " decrypt decrypt /etc/ngcp-config-crypted.tgz.gpg and restore config files\n" + printf " encrypt encrypt /etc/ngcp-config and all resulting configuration files\n" fi - printf "\ - initialise initialise setup (to be executed only once on setup) -" - # display only if init-mgmt is available if [ -r /usr/share/ngcp-ngcpcfg/scripts/init-mgmt ] ; then printf " init-mgmt set up mgmt server for Carrier ONLY environment (to be executed only once)\n" fi - printf "\ - values obsolete synonym for 'get' - get print key value from YAML configuration files - help display this help screen and exit - version display program version and exit -\n" - - printf "For further usage information and options see the ngcpcfg(8) man page.\n" + printf "\nFor further usage information and options see the ngcpcfg(8) man page.\n" } version() {