Add error checking and help to tool

Signed-off-by: Steven Dake <sdake@redhat.com>
This commit is contained in:
Steven Dake 2012-03-26 09:30:18 -07:00
parent b4b6ac333e
commit fbd62cb9c7
1 changed files with 11 additions and 2 deletions

View File

@ -11,7 +11,14 @@
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