I used Iceberg free application to make the PKG file as I've used it before with relative ease, and also couldn't find the latest official Apple PKG maker app!!
Its all working now so here's how I did it:
- Made a new project in Iceburg, and made a nice little folder to hold all the files needed (makes it easier to find things)
- I filled in the top section "Settings"
- Next was the "Scripts" section. I had to make a script which changed the com.apple.loginwindow plist file to add the LoginHook /usr/bin/login.sh
- I ran nano from the command line (nano ~Desktop/sendLogonfiles/Install\ sendLogon/writeloginhook.sh)
and typed: - #!/bin/tcsh
sudo defaults write com.apple.loginwindow LoginHook /usr/bin/login.sh - I found I had to put "sudo" into the script so that it had the right permissions to write to the file. Not sure why else it didn't work?
- I saved the file and made the file executable - chmod 755 ~Desktop/sendLogonfiles/Install\ sendLogon/writeloginhook.sh
- I then added this script to the "PostFlight" script, and set the path to "Relative". Note - I found an article here documenting the definition of each of these types of scripts. Most were concerned with whether this was an upgrade or not, and would only run once.
- Finally was the "Files" section.
- I firstly put the files in the project folder.
- I set these files with the correct permissions (as in the tutorial folder for sendLogon). chmod 755
- Then, in Iceberg, I had to add the folders; /usr/ and /usr/bin/, which were not there.
- I then made the "Default Destination" the /usr/bin/ folder
- Finally I added the login.sh file and the sendLogon file.
Note: There is potential also for adding to this a little script which changes the proxy settings to the system and maybe also Firefox, but it would be easier to control these settings through a .pac file or .wpad file.