diskimage-builder/elements/ramdisk-base/cleanup.d/99-extract-ramdisk-files
Ben Nemec 5aca301693 Refactor ramdisk element to allow alternate implementations
In preparation for enabling Dracut-based ramdisks, this change
factors out functionality that is common to both busybox and Dracut
ramdisks.  Said functionality is moved to a ramdisk-base element
which is added as a dependency of the ramdisk element.  ramdisk now
only contains the functionality specific to building busybox-based
ramdisks.

bp tripleo-juno-dracut-ramdisks
Change-Id: Iad2907c8be491c88727d87ed5e5a720e5beb66c3
2014-09-26 00:13:55 -05:00

11 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