mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-11 23:16:58 +02:00
oem/oracle: Add option to add kernel arguments to iPXE script
This commit is contained in:
parent
41aa818f0c
commit
1ea637794c
@ -15,6 +15,7 @@ ipxe=0
|
|||||||
ignition=
|
ignition=
|
||||||
baseurl="http://alpha.release.core-os.net/amd64-usr/current"
|
baseurl="http://alpha.release.core-os.net/amd64-usr/current"
|
||||||
bucket_base="users.developer.core-os.net/$USER/bmcs"
|
bucket_base="users.developer.core-os.net/$USER/bmcs"
|
||||||
|
kargs=
|
||||||
|
|
||||||
# Parse args
|
# Parse args
|
||||||
usage="Usage: $0 [args] -n name
|
usage="Usage: $0 [args] -n name
|
||||||
@ -29,9 +30,10 @@ Options:
|
|||||||
-I IMAGE-ID Image ID to use; only relevant for non-iPXE (default: ${image_id})
|
-I IMAGE-ID Image ID to use; only relevant for non-iPXE (default: ${image_id})
|
||||||
-b BASEURL URL to the image mirror; only relevant for iPXE (default: ${baseurl})
|
-b BASEURL URL to the image mirror; only relevant for iPXE (default: ${baseurl})
|
||||||
-B BUCKET-BASE GS bucket and relative path for iPXE script (default: ${bucket_base})
|
-B BUCKET-BASE GS bucket and relative path for iPXE script (default: ${bucket_base})
|
||||||
|
-k ARGS Additional kernel command line arguments for iPXE script
|
||||||
-h This ;-)
|
-h This ;-)
|
||||||
"
|
"
|
||||||
while getopts "c:a:n:s:S:i:pI:b:B:h" OPTION
|
while getopts "c:a:n:s:S:i:pI:b:B:k:h" OPTION
|
||||||
do
|
do
|
||||||
case "${OPTION}" in
|
case "${OPTION}" in
|
||||||
c) compartment="${OPTARG}" ;;
|
c) compartment="${OPTARG}" ;;
|
||||||
@ -44,6 +46,7 @@ do
|
|||||||
I) image_id="${OPTARG}" ;;
|
I) image_id="${OPTARG}" ;;
|
||||||
b) baseurl="${OPTARG}" ;;
|
b) baseurl="${OPTARG}" ;;
|
||||||
B) bucket_base="${OPTARG}" ;;
|
B) bucket_base="${OPTARG}" ;;
|
||||||
|
k) kargs="${OPTARG}" ;;
|
||||||
h) echo "${usage}"; exit 2 ;;
|
h) echo "${usage}"; exit 2 ;;
|
||||||
*) exit 2 ;;
|
*) exit 2 ;;
|
||||||
esac
|
esac
|
||||||
@ -82,7 +85,7 @@ if [[ "${ipxe}" = 1 ]]; then
|
|||||||
cat >"${tmpdir}/ipxe" <<EOF
|
cat >"${tmpdir}/ipxe" <<EOF
|
||||||
#!ipxe
|
#!ipxe
|
||||||
|
|
||||||
kernel ${baseurl}/coreos_production_pxe.vmlinuz initrd=coreos_production_pxe_image.cpio.gz coreos.first_boot=1 ${ignition_initrd_args} console=ttyS0,9600
|
kernel ${baseurl}/coreos_production_pxe.vmlinuz initrd=coreos_production_pxe_image.cpio.gz coreos.first_boot=1 ${ignition_initrd_args} console=ttyS0,9600 ${kargs}
|
||||||
initrd ${baseurl}/coreos_production_pxe_image.cpio.gz
|
initrd ${baseurl}/coreos_production_pxe_image.cpio.gz
|
||||||
${ignition_initrd_cmd}
|
${ignition_initrd_cmd}
|
||||||
boot
|
boot
|
||||||
|
Loading…
Reference in New Issue
Block a user