Friday, 30 September 2011

Making a pkg file for installing sendLogon for Bloxx on OS X

In a previous post I described how we're getting a new web filtering system called Bloxx, which needs the sendLogon program to be installed and run as a login script on all the Apple Macs (OS X).

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:
  1. Made a new project in Iceburg, and made a nice little folder to hold all the files needed (makes it easier to find things)
  2. I filled in the top section "Settings"
  3. Next was the "Scripts" section. I had to make a script which changed the plist file to add the LoginHook /usr/bin/
    1. I ran nano from the command line (nano ~Desktop/sendLogonfiles/Install\ sendLogon/
       and typed:
    2.  #!/bin/tcsh
      sudo defaults write LoginHook /usr/bin/
    3. 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?
    4. I saved the file and made the file executable - chmod 755 ~Desktop/sendLogonfiles/Install\ sendLogon/
  4. 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.
  5. Finally was the "Files" section. 
    1. I firstly put the files in the project folder.
    2. I set these files with the correct permissions (as in the tutorial folder for sendLogon). chmod 755
    3. Then, in Iceberg, I had to add the folders; /usr/ and /usr/bin/, which were not there.
    4. I then made the "Default Destination" the /usr/bin/ folder
    5. Finally I added the file and the sendLogon file.
I've just tested this through the Apple Remote Desktop Task Server on a single MacBook Pro and worked a charm (had to ring ICT though to add its' IP address to the Bloxx list of computers with sendLogon working)

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.

No comments:

Post a Comment