1
0
mirror of https://github.com/rancher/os.git synced 2025-08-28 11:12:59 +00:00

fix arg use conflict: add --cloud-config parameter

This commit is contained in:
Ivan Mikushin 2015-04-29 11:38:04 +05:00
parent c5676987a9
commit 3a5f2bcb9b

View File

@ -17,7 +17,27 @@ INITRD_TMP=${BUILD}/$(sha1sum ${INITRD} | awk '{print $1}')
INITRD_CURRENT=${BUILD}/initrd-current
INITRD_TEST=${BUILD}/initrd.test
USER_DATA=cloud-init/openstack/latest/user_data
CLOUD_CONFIG=$(readlink -f "$1") || :
while [ "$#" -gt 0 ]; do
case $1 in
--append)
shift 1
QEMU_APPEND="${QEMU_APPEND} $1"
;;
--cloud-config)
shift 1
CLOUD_CONFIG=$(readlink -f "$1") || :
if [ ! -f ${CLOUD_CONFIG} ]; then
echo No such file: "'"${CLOUD_CONFIG}"'" 1>&2
exit 1
fi
;;
*)
break
;;
esac
shift 1
done
if [[ ! -e ${KERNEL} || ! -e ${INITRD} ]]; then
echo "Failed to find ${KERNEL} or ${INITRD}" 1>&2
@ -69,19 +89,6 @@ else
done
fi
while [ "$#" -gt 0 ]; do
case $1 in
--append)
shift 1
QEMU_APPEND="${QEMU_APPEND} $1"
;;
*)
break
;;
esac
shift 1
done
qemu-system-x86_64 -serial stdio \
-kernel ${KERNEL} \
-initrd ${INITRD_TEST} \