Fixed calling apply command in fuel-createmirror

Also added option --verbose to produce more detailed output

Change-Id: I1710c208a965cfe2190a65f525a633909d7850db
Closes-Bug: #1537137
This commit is contained in:
Bulat Gaifullin 2016-01-25 23:07:27 +03:00
parent 32bca46a3b
commit 19a63fa7d6
1 changed files with 4 additions and 4 deletions

View File

@ -25,12 +25,13 @@ Options:
-M| --mos Create/Update MOS local mirror only
-U| --ubuntu Create/Update Ubuntu local mirror only
-p| --password Fuel Master admin password (defaults to admin)
-v| --verbose Add detailed output
EOF
}
# Parse options
OPTS=`getopt -o hdaMUNp: -l help,no-default,no-apply,mos,ubuntu,password:,dry-run -- "$@"`
OPTS=`getopt -o hdaMUNp: -l help,no-default,no-apply,mos,ubuntu,password:,dry-run,verbose -- "$@"`
if [ $? != 0 ]; then
usage
exit 1
@ -50,6 +51,7 @@ while true ; do
-M | --mos ) REPO_GROUPS="$REPO_GROUPS mos"; shift;;
-U | --ubuntu ) REPO_GROUPS="$REPO_GROUPS ubuntu"; shift;;
-p | --password ) CMD_OPTS="$CMD_OPTS --fuel-password=$2"; shift; shift;;
-v | --verbose ) CMD_OPTS="$CMD_OPTS --verbose"; shift;;
-- ) shift; break;;
* ) break;;
esac
@ -74,7 +76,5 @@ if [[ "$OPT_NO_DEFAULT" == "" ]]; then
fi
if [[ "$OPT_NO_APPLY" == "" ]]; then
CMD_OPTS="$CMD_OPTS --apply"
$EXEC_PREFIX fuel-mirror apply ${CMD_OPTS}
fi
$EXEC_PREFIX fuel-mirror apply ${CMD_OPTS}