diskimage-builder/elements/ramdisk/cleanup.d/99-extract-ramdisk-files
Robert Collins 072fee1a74 Ensure we can read the kernel out.
If the kernel is restricted read (as a security measure) we may not be
able to read it without chmodding it.

Change-Id: Ib577705c27d8c351288334de03a7848cf49f2de9
2014-05-14 04:25:05 +12:00

10 lines
246 B
Bash
Executable file

#!/bin/bash
set -eux
set -o pipefail
IMAGE_NAME=${IMAGE_NAME:-'image'}
sudo chmod a+r $TMP_MOUNT_PATH/tmp/ramdisk $TMP_MOUNT_PATH/tmp/kernel
cp $TMP_MOUNT_PATH/tmp/ramdisk $IMAGE_NAME.initramfs
cp $TMP_MOUNT_PATH/tmp/kernel $IMAGE_NAME.kernel