#!/bin/sh
#
# The following script removes the 'auditconfig -aconf' string from 
# /etc/security/audit_startup.
#
#     

STARTUP=$ROOTDIR/etc/security/audit_startup

# Check to see if the audit_startup file exists

if [ -f ${STARTUP} ]; then

    # If audit_startup exists, check if the 'aconf' string already present

    /usr/bin/grep '\-aconf' $STARTUP >/dev/null 2>&1

    # If 'aconf' string present, we remove the related auditconfig line

    if [ "$?" -eq "0" ]; then
        /usr/bin/grep -v '\-aconf' $STARTUP > $STARTUP.tmp
        /usr/bin/mv $STARTUP.tmp $STARTUP
        /usr/bin/chmod 0744 $STARTUP
    fi
fi

exit 0
