File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 7878%endif
7979
8080%post
81- if [ -f /etc/os-release ]; then
81+ if [ -f /etc/redhat-release ] && [ -f /etc/ os-release ]; then
8282 . /etc/os-release
8383 RHEL_MAJOR=$(echo $VERSION_ID | cut -d '.' -f 1)
8484 RHEL_MINOR=$(echo $VERSION_ID | cut -d '.' -f 2)
@@ -96,7 +96,10 @@ if [ -f /etc/os-release ]; then
9696 echo "SELinux policy tools are not available. rshim policy update failed."
9797 fi
9898 fi
99+ else
100+ echo "Skipping SELinux rshim policy fix on non-supported distribution."
99101fi
102+
100103%if "%{with_systemd}" == "1"
101104 echo "Installation complete. To enable and start the rshim service, run:"
102105 echo " systemctl daemon-reload"
117120
118121%postun
119122if [ $1 -eq 0 ] && [ -x /usr/sbin/semodule ] && semodule -l | grep -q '^rshim-fix\b'; then
120- echo "Removing SELinux rshim-fix policy..."
121123 semodule -r rshim-fix >/dev/null 2>&1 || true
122124fi
123125
You can’t perform that action at this time.
0 commit comments