- reload the apparmor profile in postun to make the changes effective

OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins-sar-perf?expand=0&rev=36
This commit is contained in:
Lars Vogdt 2021-04-22 14:26:21 +00:00 committed by Git OBS Bridge
parent 257ff21d36
commit 957a8b0672
2 changed files with 12 additions and 0 deletions

View File

@ -3,6 +3,7 @@ Thu Apr 22 12:25:03 UTC 2021 - Lars Vogdt <lars@linux-schulserver.de>
- include abstractions/bash in apparmor profile - otherwise - include abstractions/bash in apparmor profile - otherwise
the 'which iostat' command fails the 'which iostat' command fails
- reload the apparmor profile in postun to make the changes effective
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 28 14:03:05 CEST 2020 - ro@suse.de Tue Jul 28 14:03:05 CEST 2020 - ro@suse.de

View File

@ -66,6 +66,17 @@ install -D -m755 check_sar_perf.py %{buildroot}/%{nagios_plugindir}/check_sar_pe
install -m755 %{SOURCE1} %{buildroot}/%{nagios_plugindir}/check_iostat install -m755 %{SOURCE1} %{buildroot}/%{nagios_plugindir}/check_iostat
install -Dm0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_iostat install -Dm0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_iostat
%postun
if [ "$YAST_IS_RUNNING" != "instsys" ]; then
if [ -x /sbin/apparmor_parser ]; then
if /usr/bin/systemctl is-active --quiet apparmor.service; then
/sbin/apparmor_parser -r -T -W %{_sysconfdir}/apparmor.d/usr.lib.nagios.plugins.check_iostat &> /dev/null || :
fi
else
echo "Could not reload the Apparmor profile: /sbin/apparmor_parser is missing or not executable."
fi
fi
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}