Skip to content

Comments

Linux installer script hotfix for determining os, verifies tar is installed, and fixes logic error in wget url testing.#149

Merged
cr-huntress merged 1 commit intomainfrom
chore/linux-418-fixes
Feb 18, 2026
Merged

Linux installer script hotfix for determining os, verifies tar is installed, and fixes logic error in wget url testing.#149
cr-huntress merged 1 commit intomainfrom
chore/linux-418-fixes

Conversation

@cr-huntress
Copy link
Contributor

@cr-huntress cr-huntress commented Feb 18, 2026

This commit fixes an issue with parsing the Linux OS type, adds a check if tar is installed, and fixes a logic error in how wget tests urls. These changes were successfully tested against CloudLinux 8.10 and Ubuntu 24.04.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed system information detection to accurately determine Linux distribution compatibility.
    • Improved installation requirements verification to ensure necessary tools are present before proceeding.
  • Improvements

    • Expanded kernel version compatibility support for RHEL-compatible distributions.
    • Strengthened pre-installation validation checks.

…ck if tar is installed, and fixes a logic error in how wget tests urls.
@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 2026

📝 Walkthrough

Walkthrough

Updated kernel requirement validation to accept version 4.18 for RHEL-compatible distributions by parsing /etc/os-release with quote stripping. Added tar installation check, adjusted wget error handling initialization, and improved os_release_id extraction logic.

Changes

Cohort / File(s) Summary
Installation Script Updates
Bash/linux/huntress-linux-install.sh
Updated kernel requirement check to treat 4.18 as valid for RHEL-compatible distros; added tar installation validation; improved os_release_id extraction with quote stripping; adjusted test_url wget exit code handling to initialize before invocation; updated requirement comment wording.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes all three main changes: OS determination fix, tar installation verification, and wget URL testing logic correction.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/linux-418-fixes

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Bash/linux/huntress-linux-install.sh (1)

165-176: ⚠️ Potential issue | 🟠 Major

RHEL-compatible distros list incomplete—inconsistent with terminology.

The allowed_418 array only checks for ID=rhel and ID=cloudlinux, but the function comment and error message state "RHEL-compatible distros"—a term conventionally encompassing Rocky, AlmaLinux, CentOS, and Oracle Linux. Systems on these distributions will incorrectly fail the kernel check even if they meet the 4.18+ requirement. Either clarify the comment/message to match the limited list, or expand the allowed ID check to include other RHEL-compatible distros and their corresponding ID_LIKE entries.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Bash/linux/huntress-linux-install.sh` around lines 165 - 176, The kernel
check in version_check uses a narrow allowed_418 list that only contains "rhel"
and "cloudlinux" (allowed_418) and reads os_release_id from /etc/os-release,
which will cause Rocky/AlmaLinux/CentOS/Oracle to be treated as
non-RHEL-compatible; update version_check to either expand allowed_418 to
include "rocky almalinux centos oracle" and/or parse ID_LIKE (os_release_id and
os_release_id_like) so RHEL-compatible IDs are recognized, or alternatively
change the comment/error message to explicitly say only RHEL and CloudLinux are
supported; adjust the logic where allowed_418 is referenced and keep the
function name version_check and the os_release_id variable intact so callers
remain unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@Bash/linux/huntress-linux-install.sh`:
- Around line 165-176: The kernel check in version_check uses a narrow
allowed_418 list that only contains "rhel" and "cloudlinux" (allowed_418) and
reads os_release_id from /etc/os-release, which will cause
Rocky/AlmaLinux/CentOS/Oracle to be treated as non-RHEL-compatible; update
version_check to either expand allowed_418 to include "rocky almalinux centos
oracle" and/or parse ID_LIKE (os_release_id and os_release_id_like) so
RHEL-compatible IDs are recognized, or alternatively change the comment/error
message to explicitly say only RHEL and CloudLinux are supported; adjust the
logic where allowed_418 is referenced and keep the function name version_check
and the os_release_id variable intact so callers remain unchanged.

@cr-huntress cr-huntress merged commit a1e065d into main Feb 18, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants