Action Script help with installing HP Openview on Linux

(imported topic written by mac91)

I am trying to install the HP Openview client on a Linux system will no luck.

I have a folder with 12 rpms and their associated xmls. Here is my script:

download http://xxx.xxx.xxx.xxx:xxxxx/Uploads/1e21bb52a51325e95e24034c8be298a69f70471a/HPOVx86.tmp
continue if {(size of it = 36590204 AND sha1 of it = "1e21bb52a51325e95e24034c8be298a69f70471a") of file "HPOVx86.tmp" of folder "__Download"}
 
extract HPOVx86.tmp
 
wait chmod a+x hpovoinstall.sh
 
wait ./hpovoinstall.sh > /home/mac/log 2>&1

The logs show that it does download and extract but with the last two lines it returns error code=1.

I’d appreciate any help that you can throw my way.

Cheers

mac

ETA

I have tried the script from http://forum.bigfix.com/viewtopic.php?pid=9220#p9220 and am getting error code =1 when it tries

wait mv "__Download/*" "__bucket/"

I need to get all of the files and directories that are downloaded to my __bucket.

(imported comment written by NoahSalzman)

Action Script is trying to interpret the > and it’s not happy with that. You need to wrap it up like this:

waithidden /bin/sh -c “foo > bar 2>&1”

(imported comment written by mac91)

Thank you for the prompt response Noah.

After I download the files and extract them on a Linux system, they should be in __Download, correct?

After the extract command, what directory will I be in?

All I am looking to do is to download the package, extract it, then run my hpovoinstall.sh script

I have tried creating a hidey-hole and move the files that way, but I am still getting errors

//wait mv "{pathname of client folder of current site}/__Download/*.xml" "{pathname of client folder of current site}__bucket"
 
//wait mv /var/opt/BESClient/__BESData/CustomSite_test-2dtest/__Download/*.xml /var/opt/BESClient/__BESData/CustomSite_test-2dtest/__bucket/

Either of these return error code =1

My orignal plan was:

download http://xxx.xxx.xxx.xxx:xxxxx/Uploads/1e21bb52a51325e95e24034c8be298a69f70471a/HPOVx86.tmp
continue if {(size of it = 36590204 AND sha1 of it = "1e21bb52a51325e95e24034c8be298a69f70471a") of file "HPOVx86.tmp" of folder "__Download"}
 
extract HPOVx86.tmp
 
wait chmod a+x hpovoinstall.sh
 
wait ./hpovoinstall.sh

It errors out on the last two lines.

(imported comment written by NoahSalzman)

Try changing those last two lines to:

wait /bin/sh/ -c “chmod a+x hpovoinstall.sh

wait /bin/sh/ -c “hpovoinstall.sh

(imported comment written by mac91)

No dice :frowning:

At 11:54:03 -0500 - actionsite (http://x/cgi-bin/bfgather.exe/actionsite)
   Command succeeded (evaluated true) continue if {(size of it = 36590204 AND sha1 of it = "1e21bb52a51325e95e24034c8be298a69f70471a") of file "HPOVx86.tmp" of folder "__Download"} (fixlet 1144)
At 11:54:04 -0500 - actionsite (http://x/cgi-bin/bfgather.exe/actionsite)
   Command succeeded extract HPOVx86.tmp (fixlet 1144)
At 11:54:09 -0500 -
   Report posted successfully.
At 11:54:09 -0500 - actionsite (http://x/cgi-bin/bfgather.exe/actionsite)
   Command succeeded (Exit Code=1) wait /bin/sh/ -c "chmod a+x hpovoinstall.sh" (fixlet 1144)
 
At 11:54:11 -0500 - actionsite (http://x/cgi-bin/bfgather.exe/actionsite)
   Command succeeded (Exit Code=1) wait /bin/sh/ -c "hpovoinstall.sh" (fixlet 1144)
At 11:54:12 -0500 -
   ActionLogMessage: (action 1144 ) ending action

If I have uploaded the folder named HPOVx86, then download it and extract it, I should be able to call my shell script that is in the root of the folder, yes?

(imported comment written by NoahSalzman)

For troubleshooting, how about do something simple like:

download http://xxx.xxx.xxx.xxx:xxxxx/Uploads/1e21bb52a51325e95e24034c8be298a69f70471a/HPOVx86.tmp
continue if {(size of it = 36590204 AND sha1 of it = "1e21bb52a51325e95e24034c8be298a69f70471a") of file "HPOVx86.tmp" of folder "__Download"}
 
extract HPOVx86.tmp
 
wait /bin/sh -c "file hpovoinstall.sh > /tmp/does_my_file_exist"
wait /bin/sh -c "echo `pwd` > /tmp/where_am_i"

Check the output of those tmp files and see if it provides any insight.

(imported comment written by mac91)

I have went another direction and am now getting exit code=8. Is this a memory issue?

At 11:23:39 -0500 - actionsite (http://x/cgi-bin/bfgather.exe/actionsite)
   Command succeeded (Exit Code=0) wait /bin/sh -cv "chmod +x /var/opt/BESClient/__BESData/CustomSite_test-2dtest/__Download/opc_inst" (fixlet 1187)
At 11:23:42 -0500 - actionsite (http://x/cgi-bin/bfgather.exe/actionsite)
   Command succeeded (Exit Code=8) wait /bin/sh -cv "/var/opt/BESClient/__BESData/CustomSite_test-2dtest/__Download/./opc_inst " (fixlet 1187)

(imported comment written by mac91)

Appended /tmp/log 2>&1 to it and it seems exit code = 8 refers to insufficient hard drive space. Almost out of the woods.

(imported comment written by mac91)

OK, here is what worked.

download http://x/Uploads/3d98d173baa7eef623afce39480fc42445828728/bits.tmp
continue if {(size of it = 36590172 AND sha1 of it = "3d98d173baa7eef623afce39480fc42445828728") of file "bits.tmp" of folder "__Download"}
 
extract bits.tmp
 
wait /bin/sh -cv "chmod +x /{pathname of client folder of current site}/__Download/opc_inst"
 
wait /bin/sh -cv "/{pathname of client folder of current site}/__Download/./opc_inst -srv > /tmp/bars 2>&1"

/tmp/bars 2>&1 gave me some visibilty on what was going on in the background.

wait /bin/sh -c “echo pwd > /tmp/where_am_i” also helped in making sure I was pathing to the right directories.

Starting with wait /bin/sh -cv “” and then adding {pathname of client folder of current site} in the actionscript was the key.

Hello, I opened a separate thread for my issue but posting it here just in case someone on this old thread can help …

I’m pretty novice in creating Fixlets/Tasks to install software on Linux servers. I have tried the following Big Fix action script to install McAfee on Linux server but it fails … would greatly appreciate any help / advice from you !

It downloads the file fine but fails at the wait commands …

THANKS!

wait /bin/sh -c chmod 555 “{(pathname of client folder of current site) & “/__Download/install.sh”}”

wait /bin/sh -c “{(pathname of client folder of current site) & “/__Download/install.sh”}” -i

It failed … The client log shows the following …

Command succeeded (Exit Code=1) wait /bin/sh -c chmod 555 “/var/opt/BESClient/_BESData/CustomSite_Enterprise_Servers-2d_Linux/__Download/install.sh” (action:997134)

Command started - wait /bin/sh -c “/var/opt/BESClient/_BESData/CustomSite_Enterprise_Servers-2d_Linux/__Download/install.sh” -i (action:997134)

Command succeeded (Exit Code=126) wait /bin/sh -c “/var/opt/BESClient/_BESData/CustomSite_Enterprise_Servers-2d_Linux/__Download/install.sh” -i (action:997134)