diff --git a/omnibus/package-scripts/agent-rpm/posttrans b/omnibus/package-scripts/agent-rpm/posttrans index 06ac058fd1ac4..a560a4626b45d 100755 --- a/omnibus/package-scripts/agent-rpm/posttrans +++ b/omnibus/package-scripts/agent-rpm/posttrans @@ -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 @@ -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 diff --git a/releasenotes/notes/install-selinux-system-probe-policy-on-Oracle-linux-68e1fa8eacfde513.yaml b/releasenotes/notes/install-selinux-system-probe-policy-on-Oracle-linux-68e1fa8eacfde513.yaml new file mode 100644 index 0000000000000..234ac725ca17b --- /dev/null +++ b/releasenotes/notes/install-selinux-system-probe-policy-on-Oracle-linux-68e1fa8eacfde513.yaml @@ -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