2 Replies Latest reply on Jun 9, 2016 3:49 PM by Bill Robinson

    Issue running at jobs on AIX from BLPAckage's external command

    Yanick Girouard

      I've been scratching my head and literally pulling my hair off on this one for about 2 days now...


      We have a BLPAckage that copies 3 files to the staging directory, and then calls the scripts in an external command using the at command, like so:


      /usr/bin/at now + 1 minute << EOF
      sh /var/tmp/stage/myscript.sh > /var/tmp/stage/myscript.log 2>&1


      For some reason, even though the output seems to be completely suppressed, we always receive a message like so everytime the job runs:


      Subject: Output from at job sh /var/tmp/stage/myscript.sh > /var/tmp/stage/myscript.log 2>&1, root@myserver.mydomain.com, exit status 0




      Cron Environment:
       SHELL = /usr/bin/ksh
      Your "at" job executed on myserver.mydomain.com on Thu Jun  9 15:24:52 EDT 2016
      sh /var/tmp/stage/myscript.sh > /var/tmp/stage/myscript.log 2>&1
      produced the following output:
      ksh[2]: /bsatmp/effa54265bac36bd94fd79b411b2ac7f:  not found.
               cron: The previous message is the standard output
               and standard error of one of the cron commands.


      Notice that the "not found" error is matching the temporary staging directory the deploy job is creating when deploying the package, and would be where the external command shell script being generated would reside. I have no clue where this is coming from, as all my script does is an echo of the word toto and nothing else. That directory is deleted after the commit phase.


      This happens with the BLPackages made to patch CVE-2016-1543 as well (BMC release), which is quite annoying when we need to apply it on hundreds of servers and that the whole team is copied on those notifications !


      The at command is supposed to only send an email notification if there is any output generated, so I don't know how we get this.


      Would anyone have a clue how this is generated and how to prevent it ?