Skip to content

Commit

Permalink
apparmorbasetest: restart audit-rules in case of Tumbleweed
Browse files Browse the repository at this point in the history
Tumbleweed has moved to Audit 4.x series, which has split the systemd
service into audit-rules (leading) and auditd. auditd.service does not
permit to be restarted.
  • Loading branch information
DimStar77 committed Oct 1, 2024
1 parent c4317a6 commit 64ed771
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/apparmortest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,10 @@ Restart auditd and apparmor in root-console

sub pre_run_hook {
my ($self) = @_;
my $audit_service = is_tumbleweed ? 'audit-rules' : 'auditd';

select_serial_terminal;
systemctl('restart auditd');
systemctl("restart $audit_service");
sleep 3;
systemctl('restart apparmor');
$self->SUPER::pre_run_hook;
Expand Down

0 comments on commit 64ed771

Please sign in to comment.