1
0
-1

audit_linux.sh: line 453: [: !=: unary operator expected

Tried to [] the operator, but didn't help. Any advises?

--alex

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      a small follow-up: the fix for the current code is to change the line 453 to

      if [ "$(pidof -x $script_name)" != "$script_pid" ]; then

      the next version of Open-AudIT is expected to include a reworked audit script that performs this operation quite differently.

       

        CommentAdd your comment...
      1.  
        1
        0
        -1

        I cannot replicate this error.

        Can you post that section of the script and highlight line 453 so we know we're looking at the exact same thing?

        What distribution (and version) of Linux are you running this against?

        1. Mark Unwin

          Response from evariant below. CentOS 6.7 / RHEL 6.7 IFS=ORIGIFS; if [ $(pidof -x "$script_name") != "$script_pid" ]; then <== line 453 if [ "$debugging" -gt 0 ]; then echo "Exiting as other audits are currently running." for pid in $(pidof -x "$script_name"); do echo $(ps -p "$pid"); done

        2. Mark Unwin

          I still cannot replicate this error. I do have a new audit_linux.sh I can ship to you if you would like to try this. It has not been released yet.

        3. evariant

          I know, I couldn't either find out what happen here. That only happen when the script doesn't find a running version of himself, if a script is running, no error is displayed .. Yes, I'm happy to test :)

        CommentAdd your comment...