#!/bin/bash

. /var/lib/autoyast-cc/libcc

AUDITD="/etc/audit/auditd.conf"
[ ! -f $AUDITD ] && {
	cc_echo "Audit configuration file $AUDITD does not exist - skipping configuration"
	cc_exit 0
}

trap "cc_exec_log rm -f $AUDITD.$$" 0 1 2 3 15
cc_exec_log cp $AUDITD $AUDITD.$$

# Disable the audispd daemon as it is not needed
sed -i 's/dispatcher/#dispatcher/' $AUDITD.$$
cc_replace $AUDITD.$$ $AUDITD
cc_exit 0
