Output kernel command line to a file in the kernel+initrd output case

Trying to find the relevant yaml file was an issue as we now support
`--name` and it might be in a different directory, so although it is
a bit verbose outputing a whole file at least it is more consistent.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack
2017-03-20 12:16:34 +00:00
parent b8aff953f0
commit 9208496d82
7 changed files with 24 additions and 20 deletions

View File

@@ -15,6 +15,7 @@ ISO="$(find . -name '*.iso')"
RAW="$(find . -name '*.raw')"
INITRD="$(find . -name '*.img')"
KERNEL="$(find . -name vmlinuz64 -or -name '*bzImage')"
CMDLINE="$(find . -name '*-cmdline')"
if [ -n "$ISO" ]
then
@@ -38,7 +39,12 @@ fi
echo "$ARGS" | grep -q systemdisk && qemu-img create -f raw systemdisk.img 256M
CMDLINE="$*"
if [ -n "${CMDLINE}" ]
then
CMDLINE="$(cat $CMDLINE)"
else
CMDLINE="$*"
fi
if [ -z "${CMDLINE}" ]
then
CMDLINE="console=ttyS0"