File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -344,7 +344,7 @@ cs_sensor_download() {
344344
345345 existing_installers=$(
346346 curl_command -G " https://$( cs_cloud) /sensors/combined/installers/v3?sort=version|desc" \
347- --data-urlencode " filter=os:\" $cs_os_name \" +os_version: \" * $cs_os_version * \" $cs_api_version_filter$cs_os_arch_filter "
347+ --data-urlencode " filter=os:\" $cs_os_name \" $cs_os_version_filter $cs_api_version_filter$cs_os_arch_filter"
348348 )
349349
350350 handle_curl_error $?
@@ -938,6 +938,22 @@ cs_os_version=$(
938938 echo " $version "
939939)
940940
941+ cs_os_version_filter=$(
942+ # Amazon Linux versions are exact whole numbers (1, 2, 2023). A wildcard match
943+ # on Amazon Linux 2 ("*2*") also matches "2023", so AL2 hosts could be served an
944+ # AL2023 installer. Use an exact match for Amazon Linux to avoid this. The API
945+ # stores the arm64 os_version with a " - arm64" suffix, so match accordingly.
946+ if [ " ${os_name} " = " Amazon" ]; then
947+ if [ " $cs_os_arch " = " aarch64" ]; then
948+ echo " +os_version:\" $cs_os_version - arm64\" "
949+ else
950+ echo " +os_version:\" $cs_os_version \" "
951+ fi
952+ else
953+ echo " +os_version:\" *$cs_os_version *\" "
954+ fi
955+ )
956+
941957cs_falcon_token=$(
942958 if [ -n " $FALCON_PROVISIONING_TOKEN " ]; then
943959 echo " $FALCON_PROVISIONING_TOKEN "
Original file line number Diff line number Diff line change @@ -612,7 +612,7 @@ cs_sensor_download() {
612612
613613 existing_installers=$(
614614 curl_command -G " https://$( cs_cloud) /sensors/combined/installers/v3?sort=version|desc" \
615- --data-urlencode " filter=os:\" $cs_os_name \" +os_version: \" * $cs_os_version * \" $cs_api_version_filter$cs_os_arch_filter "
615+ --data-urlencode " filter=os:\" $cs_os_name \" $cs_os_version_filter $cs_api_version_filter$cs_os_arch_filter"
616616 )
617617
618618 handle_curl_error $?
@@ -1211,6 +1211,22 @@ cs_os_version=$(
12111211 echo " $version "
12121212)
12131213
1214+ cs_os_version_filter=$(
1215+ # Amazon Linux versions are exact whole numbers (1, 2, 2023). A wildcard match
1216+ # on Amazon Linux 2 ("*2*") also matches "2023", so AL2 hosts could be served an
1217+ # AL2023 installer. Use an exact match for Amazon Linux to avoid this. The API
1218+ # stores the arm64 os_version with a " - arm64" suffix, so match accordingly.
1219+ if [ " ${os_name} " = " Amazon" ]; then
1220+ if [ " $cs_os_arch " = " aarch64" ]; then
1221+ echo " +os_version:\" $cs_os_version - arm64\" "
1222+ else
1223+ echo " +os_version:\" $cs_os_version \" "
1224+ fi
1225+ else
1226+ echo " +os_version:\" *$cs_os_version *\" "
1227+ fi
1228+ )
1229+
12141230cs_falcon_token=$(
12151231 if [ -n " $FALCON_PROVISIONING_TOKEN " ]; then
12161232 echo " $FALCON_PROVISIONING_TOKEN "
You can’t perform that action at this time.
0 commit comments