Activity log for bug #1463468

Date Who What changed Old value New value Message
2015-06-09 15:51:14 Albert White bug added bug
2015-06-10 12:55:00 Albert White rally: assignee Albert White (albertw)
2015-06-23 20:38:49 Albert White description in install_rally.sh we do set -e ... args=$(getopt --name "$PROG" --shell sh -l "$long_opts" -o "$short_opts" -- "$@") if [ $? -ne 0 ]; then ... set -r instructs the shell to exit when a command returns a non zero error code so if getopt fails we never make it into the if conditions to proceed. A solution is to allow shell commands to give non zero return codes around this piece of code: diff --git a/install_rally.sh b/install_rally.sh index 1f15fd3..d606d4c 100755 --- a/install_rally.sh +++ b/install_rally.sh @@ -460,6 +460,7 @@ setup_rally_configuration () { short_opts='d:vfsyhD:p:' long_opts='target:,verbose,overwrite,system,yes,dbtype:,python:,db-user:,db-password:,db-host:,db-name:,help' +set +e if [ "x$(getopt -T)" = 'x' ]; then # GNU getopt args=$(getopt --name "$PROG" --shell sh -l "$long_opts" -o "$short_opts" -- "$@") @@ -472,10 +473,11 @@ else # old-style getopt, use compatibility syntax args=$(getopt "$short_opts" "$@") if [ $? -ne 0 ]; then - abort 1 "Type '$PROG --help' to get usage information." + abort 1 "Type '$PROG -h' to get usage information." fi eval set -- "$args" fi +set -e # Command line parsing while true in install_rally.sh we do set -e ... args=$(getopt --name "$PROG" --shell sh -l "$long_opts" -o "$short_opts" -- "$@")     if [ $? -ne 0 ]; then ... set -e instructs the shell to exit when a command returns a non zero error code so if getopt fails we never make it into the if conditions to proceed. A solution is to allow shell commands to give non zero return codes around this piece of code: diff --git a/install_rally.sh b/install_rally.sh index 1f15fd3..d606d4c 100755 --- a/install_rally.sh +++ b/install_rally.sh @@ -460,6 +460,7 @@ setup_rally_configuration () {  short_opts='d:vfsyhD:p:'  long_opts='target:,verbose,overwrite,system,yes,dbtype:,python:,db-user:,db-password:,db-host:,db-name:,help' +set +e  if [ "x$(getopt -T)" = 'x' ]; then      # GNU getopt      args=$(getopt --name "$PROG" --shell sh -l "$long_opts" -o "$short_opts" -- "$@") @@ -472,10 +473,11 @@ else      # old-style getopt, use compatibility syntax      args=$(getopt "$short_opts" "$@")      if [ $? -ne 0 ]; then - abort 1 "Type '$PROG --help' to get usage information." + abort 1 "Type '$PROG -h' to get usage information."      fi      eval set -- "$args"  fi +set -e  # Command line parsing  while true
2015-06-23 20:49:08 Albert White rally: status New In Progress
2015-06-24 12:15:52 Andriy Kurilin rally: importance Undecided Medium
2015-06-24 12:15:54 Andriy Kurilin rally: milestone 0.1.0
2015-06-24 13:49:56 OpenStack Infra rally: status In Progress Fix Committed
2015-09-27 08:34:46 Boris Pavlovic rally: status Fix Committed Fix Released