1
0
mirror of https://github.com/rancher/os-kernel.git synced 2025-08-30 10:17:55 +00:00
os-kernel/images/10-headers/headers.sh
Sven Dowideit 62bdf18b9d os-extras and os-headers images are built for release/ci
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2016-11-14 21:48:51 +10:00

22 lines
466 B
Bash
Executable File

#!/bin/bash
set -e
set -x
echo "Kernel headers for ${KERNEL_VERSION}"
DIR=/lib/modules/${KERNEL_VERSION}/build
STAMP=/lib/modules/${KERNEL_VERSION}/.headers-done
if [ -e $STAMP ]; then
echo Kernel headers for ${KERNEL_VERSION} already installed. Delete $STAMP to reinstall
exit 0
fi
rm -rf $DIR
mkdir -p $DIR
cat /headers.tar.gz | gzip -dc | tar xf - -C $DIR
touch $STAMP
echo Kernel headers for ${KERNEL_VERSION} installed. Delete $STAMP to reinstall