my guess is that your ‘run’ command doesn’t complete before your wait command executes. Try changing ‘run chmod …’ to ‘wait chmod …’.
Also, I’d recommend checking the hash on your script to make sure it hasn’t changed during transit. The best way would be to switch to use ‘prefetch’ instead of ‘download’. The download command has been deprecated in favor of the prefetch command.
I’m trying to take their script, output it to text file and then read that text file in as a property, but if there’s a fixlet that can more easily get me this information that would be great. However the knowledge from knowing how to do what I’ve been trying to do would be useful for the future.
usually with a -c option you need to put the command line in quotes. So try this:
wait sh -c ‘__Download/openssh-blacklist-1.0.sh > opensshresults.txt’
However, I believe you lose your base path when you call sh with -c, so you may actually need to do this:
wait sh -c ‘"{pathname of client folder of current site}/__Download/openssh-blacklist-1.0.sh" > “{pathname of client folder of current site}/opensshresults.txt”’
Still no joy. It downloads the file, line says completed but there is no text file.
Could it be a rights issue? If the command is there and BigFix tries to run it and RedHat kicks an error wouldn’t it still say completed?
Although if it returned an error I would think whatever it returned would be represented in the text file I have the results piping to.
Are there any other recommended methods for running a shell script? I could change the action from BigFix action to script and paste the contents of the script in there but I’m not fluent enough with sh to add in the pipe results to text file…
continue if {(size of it = 5075 AND sha1 of it = “afaef2a0e7e0db8de20c3b6893cd23a137bdbf76”) of file “openssh-blacklist-1.0.sh” of folder “__Download”}
// Create clean temp directory for storing information