Skip to content

Commit

Permalink
new(scripts): add bottlerocket support in falco-driver-loader.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP authored and poiana committed Dec 19, 2022
1 parent 100e92a commit 9d2f1e0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/falco-driver-loader
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,16 @@ get_target_id() {
exit 1
fi
;;
("bottlerocket")
TARGET_ID="${OS_ID}"
# variant_id has been sourced from os-release. Get only the first variant part
if [[ -n ${VARIANT_ID} ]]; then
# take just first part (eg: VARIANT_ID=aws-k8s-1.15 -> aws)
VARIANT_ID_CUT=${VARIANT_ID%%-*}
fi
# version_id has been sourced from os-release. Build a kernel version like: 1_1.11.0-aws
KERNEL_VERSION="1_${VERSION_ID}-${VARIANT_ID_CUT}"
;;
(*)
TARGET_ID=$(echo "${OS_ID}" | tr '[:upper:]' '[:lower:]')
;;
Expand Down

0 comments on commit 9d2f1e0

Please sign in to comment.