]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Add error checking and help to tool
authorSteven Dake <sdake@redhat.com>
Mon, 26 Mar 2012 16:30:18 +0000 (09:30 -0700)
committerSteven Dake <sdake@redhat.com>
Mon, 26 Mar 2012 16:30:18 +0000 (09:30 -0700)
Signed-off-by: Steven Dake <sdake@redhat.com>
tools/openstack

index d0e046445bd7f1348833e1ac91af424d6c2eca53..f7909703539f54475dc228a4d6678cd39b9ce6cd 100755 (executable)
 action=$1
 if [ -z "$action" ]
 then
-    action="start"
+       echo "openstack [start|stop|install|erase]"
+       echo ""
+        echo "This tool is designed to control OpenStack on a Fedora 16/17 system"
+       echo ""
+        echo "start - Starts OpenStack"
+       echo "stop - Stops OpenStack"
+       echo "install - Installs a fresh OpenStack system with Keystone from your repos"
+       echo "erase - permanently destroys an existing installation of OpenStack"
 fi
 
 function os_start() {
@@ -125,6 +132,8 @@ EOF
 }
 
 case $action in
+       "")
+               ;;
        start)
                os_start
                ;;
@@ -138,7 +147,7 @@ case $action in
                os_install
                ;;
        *)
-               echo "no action $action"
+               echo "The action \"$action\" is not supported."
        ;;
 esac