Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-14083

RH342: ch02s08 - cronjob command is incorrect - RHT2213956

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • RH342 - RHEL8.4-en-4-20240626
    • RH342
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • 2
    • en-US (English)

      Please fill in the following information:


      URL: ch02s08
      Reporter RHNID: nhardima
      Section title: Guided Exercise: Configuring Change Tracking
      Language: English

      Issue description

      at step 6 the script never sends the message to the student, as when there are changes in the filesystem the error code of /sbin/aide --check is 4, not 0, hence the AND never passes. 

      aide check with no differences returns 0 (true)
      aide check with differences returns 4 (false)

      Steps to reproduce:

      I added an "echo" to the script to better visualize the behavior of the cronjob command:

      Notice how the AND never shows the echo "Email was sent"output:

       

      It does with an OR{}:

       

       

      Workaround:

      The AND in the cronjob:

       

      /sbin/aide --check && /root/aide_mon.sh

       Should be an OR: 

       

       

      /sbin/aide --check|| & /root/aide_mon.sh

       

       

       

            glsbugs-hybridcloud@redhat.com PTL - RHEL Team
            carias@redhat.com Carlos Arias
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: