forked from aws-samples/amazon-eks-custom-amis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a 5.10 kernel version that supports live patching
- Loading branch information
1 parent
19a5cac
commit bf83ce9
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o pipefail | ||
set -o nounset | ||
set -o errexit | ||
|
||
echo "linux kernel info" | ||
uname -r | ||
rpm -qa | grep kernel | ||
amazon-linux-extras | grep kernel | ||
|
||
case $(uname -r) in | ||
5.10.*) | ||
echo "already using a 5.10 kernel version" | ||
;; | ||
*) | ||
echo "use linux kernel 5.10" | ||
amazon-linux-extras disable kernel-5.4 | ||
amazon-linux-extras install kernel-5.10 -y | ||
rpm -qa | grep kernel | ||
|
||
echo "rebooting the instance" | ||
reboot | ||
;; | ||
esac |