Skip to main content

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:





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.





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.




@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 ! :)


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.


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


Reply