mirror of
https://github.com/rancher/os.git
synced 2025-07-16 08:05:51 +00:00
19 lines
413 B
Bash
19 lines
413 B
Bash
|
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
|
DIR=$(readlink /lib/modules/$(uname -r)/build)
|
||
|
STAMP=/lib/modules/$(uname -r)/.extra-done
|
||
|
VER=$(basename $DIR)
|
||
|
URL=https://github.com/rancher/os-kernel/releases/download/${VER}/extra.tar.gz
|
||
|
|
||
|
if [ -e $STAMP ]; then
|
||
|
echo Kernel extras already installed in $DIR
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
echo Downloading $URL
|
||
|
wget -O - $URL | gzip -dc | tar xf - -C /
|
||
|
touch $STAMP
|
||
|
|
||
|
echo Kernel extras installed at $DIR
|