Skip to content

Commit

Permalink
fix(scripts/falco-driver-loader): fixed ubuntu kernel version
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo committed Jun 13, 2023
1 parent 0034d01 commit c72351f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/falco-driver-loader
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,15 @@ get_target_id() {
# 5.15.0-1009-aws -> ubuntu-aws
if [[ $KERNEL_RELEASE =~ -([a-zA-Z]+)(-.*)?$ ]];
then
TARGET_ID="ubuntu-${BASH_REMATCH[1]}${BASH_REMATCH[2]}"
TARGET_ID="ubuntu-${BASH_REMATCH[1]}"
else
TARGET_ID="ubuntu-generic"
fi

if [[ $(uname -v) =~ (^#[0-9]+\~[^-]*-Ubuntu .*$) ]];
then
KERNEL_VERSION=$(uname -v | sed 's/#\([^-\\ ]*\).*/\1/g')
fi
;;
("flatcar")
KERNEL_RELEASE="${VERSION_ID}"
Expand Down

0 comments on commit c72351f

Please sign in to comment.