#!/bin/sh

STARTUP=$ROOTDIR/etc/security/audit_startup
STARTUPTMP=$ROOTDIR/etc/security/audit_startup.tmp

# Check to see if the audit_startup file exists
if [ -f ${STARTUP} ]; then

    # If audit_startup exists, check if '-setpolicy none' is present
 
    /usr/bin/grep 'auditconfig -setpolicy none' $STARTUP > /dev/null 2>&1

    # If the '-setpolicy none' string present, we remove it

    if [ "$?" -eq "0" ]; then
        /usr/bin/grep -v 'auditconfig -setpolicy none' $STARTUP > $STARTUPTMP
        /usr/bin/mv $STARTUPTMP $STARTUP
        chmod 0744 $STARTUP
    fi
fi

exit 0
