Merge pull request #116 from marineam/qemush

fix(qemu_template): Fix getopts usage in qemu wrapper script.
This commit is contained in:
Michael Marineau 2013-10-09 11:10:34 -07:00
commit 505ef86bbd
2 changed files with 9 additions and 4 deletions

View File

@ -25,17 +25,22 @@ Any arguments after -a and -p will be passed through to qemu, -- may be
used as an explicit separator. See the qemu(1) man page for more details.
"
script_args=1
while getopts ":a:p:vh" OPTION
do
case $OPTION in
a) SSH_KEYS="$OPTARG"; shift 2 ;;
p) SSH_PORT="$OPTARG"; shift 2 ;;
v) set -x; shift ;;
a) SSH_KEYS="$OPTARG" ;;
p) SSH_PORT="$OPTARG" ;;
v) set -x ;;
h) echo "$USAGE"; exit ;;
?) break ;;
esac
script_args=$OPTIND
done
shift $((script_args - 1))
[ "$1" == "--" ] && shift
METADATA=$(mktemp -t -d coreos-meta-data.XXXXXXXXXX)
if [ $? -ne 0 ] || [ ! -d "$METADATA" ]; then

View File

@ -71,7 +71,7 @@ sudo mkdir -p "${ROOT_FS_DIR}/etc"
sudo_clobber "${ROOT_FS_DIR}/etc/lsb-release" <<EOF
DISTRIB_ID=$COREOS_VERSION_NAME
DISTRIB_RELEASE=$COREOS_VERSION_STRING
DISTRIB_CODENAME="Wearing A Party Hat"
DISTRIB_CODENAME="West Coast Style"
DISTRIB_DESCRIPTION="$COREOS_VERSION_NAME $COREOS_VERSION_DESCRIPTION"
COREOS_RELEASE_BOARD=$FLAGS_board
COREOS_RELEASE_DESCRIPTION="$COREOS_VERSION_DESCRIPTION"