Skip to content

Commit

Permalink
[system-probe] Add Oracle Linux to distros we install system-probe se…
Browse files Browse the repository at this point in the history
…linux policy on (#29612)
  • Loading branch information
hmahmood authored Sep 30, 2024
1 parent 06a40ca commit e31532d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions omnibus/package-scripts/agent-rpm/posttrans
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ INSTALL_DIR=/opt/datadog-agent
CONFIG_DIR=/etc/datadog-agent
SERVICE_NAME=datadog-agent

KNOWN_DISTRIBUTION="(Debian|Ubuntu|RedHat|CentOS|openSUSE|Amazon|Arista|SUSE|Rocky|AlmaLinux)"
KNOWN_DISTRIBUTION="(Debian|Ubuntu|RedHat|CentOS|openSUSE|Amazon|Arista|SUSE|Rocky|AlmaLinux|Oracle)"
DISTRIBUTION=$(lsb_release -d 2>/dev/null | grep -Eo $KNOWN_DISTRIBUTION || grep -Eo $KNOWN_DISTRIBUTION /etc/issue 2>/dev/null || grep -Eo $KNOWN_DISTRIBUTION /etc/Eos-release 2>/dev/null || grep -m1 -Eo $KNOWN_DISTRIBUTION /etc/os-release 2>/dev/null || uname -s)

# Create a symlink to the agent's binary
Expand All @@ -28,8 +28,8 @@ fi

# Only install selinux policy on a few known distributions
INSTALL_SELINUX_POLICY="false"
if [ "$DISTRIBUTION" = "CentOS" ] || [ "$DISTRIBUTION" = "RedHat" ] || [ "$DISTRIBUTION" = "Rocky" ] || [ "$DISTRIBUTION" = "AlmaLinux" ]; then
OS_RELEASE_VERSION=$(grep VERSION_ID /etc/os-release | cut -d = -f 2 | tr -d '"')
if [ "$DISTRIBUTION" = "CentOS" ] || [ "$DISTRIBUTION" = "RedHat" ] || [ "$DISTRIBUTION" = "Rocky" ] || [ "$DISTRIBUTION" = "AlmaLinux" ] || [ "$DISTRIBUTION" = "Oracle" ]; then
OS_RELEASE_VERSION=$(grep VERSION_ID /etc/os-release | cut -d = -f 2 | cut -d . -f 1 | tr -d '"')
if [ "$OS_RELEASE_VERSION" = "7" ]; then
INSTALL_SELINUX_POLICY="true"
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Each section from every release note are combined when the
# CHANGELOG.rst is rendered. So the text needs to be worded so that
# it does not depend on any information only available in another
# section. This may mean repeating some details, but each section
# must be readable independently of the other.
#
# Each section note must be formatted as reStructuredText.
---
enhancements:
- |
The system-probe selinux policy is now installed on Oracle Linux

0 comments on commit e31532d

Please sign in to comment.