1
0
mirror of https://github.com/rancher/os-kernel.git synced 2025-07-13 21:34:01 +00:00
os-kernel/images/10-headers/headers.sh

22 lines
464 B
Bash
Raw Normal View History

#!/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 /build.tar.gz | gzip -dc | tar xf - -C $DIR
touch $STAMP
echo Kernel headers for ${KERNEL_VERSION} installed. Delete $STAMP to reinstall