1
0
mirror of https://github.com/rancher/os.git synced 2025-06-22 21:17:02 +00:00
os/scripts/package-initrd
Sven Dowideit cc78ff7bd1 make the iso run also get the ssh and cloud-init so testing the installer is easier
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-01-15 23:40:16 +00:00

26 lines
420 B
Bash
Executable File

#!/bin/bash
set -e
cd $(dirname $0)/..
BUILD=$(pwd)/build
INITRD_DIR=${BUILD}/initrd
ARTIFACTS=$(pwd)/dist/artifacts
INITRD=${ARTIFACTS}/initrd
mkdir -p ${ARTIFACTS}
if [ ! -f ${ARTIFACTS}/vmlinuz-${KERNEL_VERSION} ]; then
exit 0
fi
if [ "$COMPRESS" == "" ]; then
COMPRESS="gzip -1"
fi
cd ${INITRD_DIR}
echo Creating ${INITRD}
find | cpio -H newc -o | ${COMPRESS} > ${INITRD}
echo Done creating ${INITRD}