]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Fixes usage
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 10 Mar 2017 17:15:24 +0000 (14:15 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 10 Mar 2017 17:15:24 +0000 (14:15 -0300)
kvmx

diff --git a/kvmx b/kvmx
index 6fd328d97a54d04fc108183ccaaffb6d695d83bb..6a67d09773a141fef8373fdaed25831db49f989e 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -124,7 +124,7 @@ function kvmx_usage {
   echo ""
   echo "available actions:"
   echo ""
-  grep "^function kvmx_" $0 | cut -d ' ' -f 2 | sed -e 's/kvmx_/\t/'
+  grep "^function kvmx_" $0 | cut -d ' ' -f 2 | sed -e 's/kvmx_/\t/' | sort
   echo ""
   echo "examples:"
   echo ""
@@ -268,7 +268,7 @@ function kvmx_initialize {
   mkdir -p $GLOBAL_USER_CONFIG_FOLDER
 
   # Load and check guest config
-  if [ "$ACTION" != "init" ] && [ "$ACTION" != "list" ] && [ "$ACTION" != "edit" ]; then
+  if [ "$ACTION" != "init" ] && [ "$ACTION" != "list" ] && [ "$ACTION" != "edit" ] && [ "$ACTION" != "usage" ]; then
     if [ ! -e "$GLOBAL_USER_CONFIG_FOLDER/$VM" ]; then
       echo "$BASENAME: config not found: $GLOBAL_USER_CONFIG_FOLDER/$VM"
       exit 1