Composer postinstall

asidhu
New Contributor III

Hi All,

I need some help here. I am probably making a silly mistake here but the postinstall script is not working. So i am using composer to repackage Cisco Anyconnect and then i added a postinstall script as well:

b289dc3739a14db78a5d4971f565282c

Yes the postinstall gives that exclamation mark but if i add a space in between the ! and / which makes it #! /bin/sh then it goes away however doesn't really do anything. I noticed when running the pkg it does copy the files over to the path eventhough it says the installation failed but the script just wont run.

c3cd4637d6cb4896bf2c259faa2c866f

659917387b8f4fe09d65dd22e3dc91ab

4 REPLIES 4

merlin
New Contributor III

Hi,
first things first, it's definetely 100%

#!/bin/sh

What are the permissions on the pkg file? it should be something like 754 for it to execute.

ad4966ccabfa49c995d8597a5db6aff8

asidhu
New Contributor III

@merlin I changed it to what you have in the screenshot and its still the same. I mean it does copy the files in .pkg as per the directory structure, just the script doesn't seem to work and the installer says failed at the end.

Edit: i managed to get it working, looks like it was the script. I modified it and now it works like a charm. Thank you ! :)

PaulHazelden
Valued Contributor

I have found thePost install scripts do not like to be tabbed. I copied and made some look real neat and tidy in there and they failed. Then I got rid of all of the tabs and had it all left justified and the exact same script worked.

Tangentism
Contributor II

@PaulHazelden Change the setting in your IDE/Script editor to convert tabs to spaces