BigFix Action Script

Hello Team,

I am working on below action script but below script is not running and directly getting exit with below output.

Relevant - ISC - RHEL - HCL Technologies Limited Workload Automation 10.1 (fixlet:1226)
At 09:13:39 -0500 -
   ActionLogMessage: (action:1226) Action signature verified for Downloads
   ActionLogMessage: (action:1226) If result is not 'true' or 'false'.
At 09:13:41 -0500 -
   ActionLogMessage: (action:1226) ending action
At 09:13:43 -0500 - mailboxsite (http://hello.com:52311/cgi-bin/bfgather.exe/mailboxsite1087720690)
   Not Relevant - ISC - RHEL - HCL Technologies Limited Workload Automation 10.1 (fixlet:1226)
At 09:14:25 -0500 -
   Report posted successfully

action parameter query “HWA_AGENT_Installation_Type” with description “Please specify the type of HWA agent installation you want to do on this machine”

//Creation of new directory
//if {not exists folder “/opt/apps/HWA/WA/Install”}

wait /bin/sh -c “mkdir -p “/opt/apps/HWA/WA/Install””

//Downloading the Binaries
prefetch b16b6b744dda9b7ea90beb079076989837d5d081 sha1:b16b6b744dda9b7ea90beb079076989837d5d081 size:615660542 https://hello.com/bfx/b16b6b744dda9b7ea90beb079076989837d5d081/HWA_10.1.0.3_LNX_X86_64_AGENT_2023.05.tmp sha256:d763d128eb7a779bad72e8b46b1caf99ada10e661d7859b7e95a6c7a28465323

//Extract the HWA Agent package
extract b16b6b744dda9b7ea90beb079076989837d5d081 “/opt/apps/HWA/Install”

//Set Permission
wait /bin/sh -c “chmod 755 “/opt/apps/HWA/Install””

//Create the group if it doesn’t exist
wait /bin/sh -c “sudo groupadd unison”

//Create the HWA user with home directory and assigned group
wait /bin/sh -c “sudo useradd -m -d /opt/apps/HWA/WA -g unison wauser”

//Set a password for the new user
wait /bin/sh -c “echo ‘wauser:StrongP@55phrase@2023QWERTY’ | sudo chpasswd”

//Password for the “wauser” set to “Never Expires”
wait /bin/sh -c “sudo chage -E -1 wauser”

//assign root access to “wauser”
wait /bin/sh -c “echo ‘wauser ALL=(ALL:ALL) ALL’ | sudo tee /etc/sudoers.d/wauser_sudo”
wait /bin/sh -c “sudo chmod 440 /etc/sudoers.d/wauser_sudo”

//Create a directory called “Install” under /opt/apps/HWA for copying the binaries
wait /bin/sh -c “mkdir -p /opt/apps/HWA/Install”

if {{parameter “HWA_AGENT_Installation_Type”} = “FTA”

//Execute the below installation command via root user to install FTA
wait /bin/sh -c “cd /opt/apps/HWA/Install/HWA_10.1.0.3_LNX_X86_64_AGENT_2023.05/TWS/LINUX_X86_64”
wait /bin/sh -c “./twsinst -new -acceptlicense yes -uname wauser -agent fta -company hello -inst_dir /opt/apps/HWA/WA -data_dir /opt/apps/HWA/WA/TWSDATA -master HWAPMDMPR -port 31111 -thiscpu <>”

//remove root permission
wait /bin/sh -c “sudo rm /etc/sudoers.d/wauser_sudo”

//remove binary directory
wait /bin/sh -c “rm -rf “/opt/apps/HWA/Install””

else

//Execute the below installation command via root user to install FTA and DA
wait /bin/sh -c “cd /opt/apps/HWA/Install/HWA_10.1.0.3_LNX_X86_64_AGENT_2023.05/TWS/LINUX_X86_64”
wait /bin/sh -c “./twsinst -new -acceptlicense yes -uname wauser -agent both -company hello -inst_dir /opt/apps/HWA/WA -data_dir /opt/apps/HWA/WA/TWSDATA -master HWAPMDMPR -port 31111 -thiscpu <> -jmport 31114 -tdwbhostname HWAPMDMPR.hello.com -tdwbport 31116”

//remove user permission
wait /bin/sh -c “sudo rm /etc/sudoers.d/wauser_sudo”

//remove binary directory
wait /bin/sh -c “rm -rf “/opt/apps/HWA/Install””

endif

What is the detailed action status in the Console?

showing error

image

This is not correct actionscript

Try:
if {parameter “HWA_AGENT_Installation_Type” = “FTA”}

Still having the same issue.

Are the double quotes set correctly?

Yes i have set double quotes Correctly

Post the log again, likely a different error this time.

There could also be an edge-case where this is evaluated during the pre-execution, to process the dynamic downloads. Before the action is ‘running’ the parameter may not have a value, which can give a syntax error during the ‘evaluating downloads’ phase.

Try using a guarded relevance to see if this corrects it

if {exists parameter "HWA_AGENT_Installation_Type" whose (it = "FTA") }

Working for me, thanks a lot