terraform-templates icon indicating copy to clipboard operation
terraform-templates copied to clipboard

Add sha-bang for check-fw.sh

Open tuckner opened this issue 7 years ago • 3 comments

Tested on Ubuntu 16.04, default interpreter ran by provisioner is /bin/sh causing the script to fail. Adding sha-bang '#!/bin/bash' fixes the issue. Provisioner could also declare the correct interpreter for the script.

Error: null_resource.check_fw_ready (local-exec): ./check_fw.sh: 9: ./check_fw.sh: [[: not found

tuckner avatar Dec 06 '17 20:12 tuckner

I struggled for an hour this morning before realizing that Ubuntu 18.04 aliases /bin/sh to dash instead of bash. Why haven't either one of @tuckner's proposed fixes been merged?

jeffbrl avatar Oct 22 '19 15:10 jeffbrl

@tuckner @jeffbrl could you please help me , i'm deploying palo alto BYOL to test in aws.

the terraform plan command gives this error while interpreting:

Error: Error applying plan:

1 error occurred: * null_resource.check_fw_ready: Error running command './check_fw.sh 54.237.40.71': exit status 1. Output: '.' is not recognized as an internal or external command, operable program or batch file.

chiranjeev2019 avatar Jun 08 '20 13:06 chiranjeev2019

@chiranjeev2019 The shell script isn't going to work on Windows.

jeffbrl avatar Jun 08 '20 14:06 jeffbrl