1 Reply Latest reply on Jun 14, 2012 1:55 PM by Bill Robinson

    Create Audit job to validate subset of content within a file

      I have a need to be able to perform a BladeLogic audit job on a subset of content within a file on AIX systems.

      The file is /etc/rc.shutdown.

      Right now I just care about validating the subset of content within this file and not the whole file itself, I am not interested

      in the rest of the file content.

      Below is a sample of the /etc/rc.shutdown script.

      I have placed comments around the section of the file I am interested in auditing.

       

      I'm looking for some ideas, direction or documentation that can assist me in accomplishing this with BladeLogic Audit job

       

      Here is an example of the file

      #> cat /etc/rc.shutdown

                #CT_NODE_RUNSTATE_BEGIN: Do not modify this section manually
                   if [[ -f /usr/sbin/rsct/bin/ct_node_runstate ]]
                   then
                        /usr/sbin/rsct/bin/ct_node_runstate -w SHUTDOWN
                   fi
                if [ $(ps -ef | grep oracle |grep -v grep| wc -l ) -gt 0 ] ;
                   then
                    echo "Shutting Down Oracle DB server .. \c"
                    su oracle -c "/opt/oracle/scripts/dbshut"
                fi
                #

      ##################################################

      # I ONLY WANT TO AUDIT THE BELOW SECTION OF THE FILE

      ##################################################

               if [ -x /etc/rc.ovpa ];
                        then echo "Shutting Down MWA ... \c";
                        /etc/rc.ovpa stop
                        echo Complete;
                elif [ -x /etc/rc.mwa ];
                        then echo "Shutting Down MWA ... \c";
                        /etc/rc.mwa stop
                        echo Complete;
                        fi

      ##################################################

      # I ONLY WANT TO AUDIT THE ABOVE SECTION OF THE FILE

      ##################################################

           #
           if [ $(ps -ef | grep actuate |grep -v grep| wc -l ) -gt 0 ] && \
              [ -x /opt/Actuate/8/AcServer/bin/shutdown_srvr.sh ]; then
                 echo "Shutting Actuate Instances .. \c"
                 su - actuate -c "/opt/Actuate/8/AcServer/bin/shutdown_srvr.sh -y -t 9"
              fi