k2clientconfig (Mac)OverviewThe k2clientconfig script is an OS X command line utility that lets you customize the packaged OS X client installer (K2Client.mpkg or K2Mobile.mpkg) with a pre-configured KeyServer DNS name (or IP address). You can also customize other client settings and the installer behavior itself to suit your particular deployment strategy. In order to customize a copy of K2Client.mpkg, first, mount the client installer disk image (K2Client.dmg) and copy its contents (K2Client.mpkg) onto a writable drive. Use the Mac OS X Terminal program to cd to the installer package directory - from the command prompt in the terminal window type "cd " and then drag the K2Client.mpkg (which is itself actually a directory) into the terminal window. Now with K2Client.mpkg as the current directory type: ./Contents/Resources/k2clientconfig The command line options for k2clientconfig will be displayed. The table below gives a more complete explanation with defaults underlined and some additional comments. Running k2clientconfig with a particular set of command line options changes ONLY those options specified on the command line, leaving all other options set to their current values. Therefore, it not necessary to specify every command line option - only those which you would like to change. Note: the only difference between the K2Client.dmg or K2Mobile.dmg images is the default configuration of the enclosed installers- K2Client.mpkg does not install KeyCheckout, K2Mobile.mpkg does. K2clientconfig can change one into the other as well as the more interesting customizations explained below. k2clientconfig
1 Note that by default, the installer will prompt for the KeyServer address during installation. If you are using Apple Remote Desktop for distribution of the mpkg, this dialog will appear on the computer where the software is being installed - not on the computer where Remote Desktop is running. Therefore, you will probably want to configure the KeyServer address, and set the installer to silent mode. To do so, you would do something like: ./Contents/Resources/k2clientconfig -h 192.168.0.16 -s 2 -g yes (where K2Client.mpkg is the current directory) 2 "-r yes" will start KeyAccess after installation. In order to do so, it must kill any currently running KeyAccess. If you do not use keyed software, this has no unexpected consequences - if the client has a connection to KeyServer, it will close the connection, and the newly installed KeyAccess will open a new connection. However, if a keyed program is running when this happens, the new session will not ask for the key again. Therefore, KeyAccess will ask the user to quit the keyed program about 15 minutes after the installation. For this reason, you should only use "-r yes" if your clients do not yet have KeyAccess software installed, or if you do not use any keyed programs. If you use "-r yes", you may want to also use "-b no", since a restart is no longer necessary. e.g.: ./Contents/Resources/k2clientconfig -r yes -b no (where K2Client.mpkg is the current directory) 3. For one more example, suppose you want users who run the mpkg installer not to be able to choose the server address. After installation, you don't want them to be able to see the KeyAccess Preference Panel, and don't want them to be able to make changes (such as changing the KeyServer address). In this case, with K2Client.mpkg as the current directory type something like: ./Contents/Resources/k2clientconfig -h 192.168.0.16 -s 2 -g yes -p no -l yes (where K2Client.mpkg is the current directory)
Technical DetailsThe behaviour of a packaged OS X client installer is determined by which sub-packages (pkg) are included in the meta-package (mpkg) and on the configuration of its various plist files. K2clientConfig provides a simple command line interface to manipulate the plist settings in both the meta-package and its sub-packages, but the plists could also be edited by hand. Most of the common command line options correspond to settings in the file: Contents/KeyAccess.pkg/Contents/Resources/k2clientconfig.plist
Entire sections from the Contents/Info.plist file are added or removed when the installer is configured to include or exclude various sub-packages. You can determine what these other options do by reading the k2clientconfig script. Note: the OS X installer has a step at the end of installation where it says “Optimizing”. This is really a call to "update_prebinding" and the mpkg has no direct control over this step - it always happens and may take about 30 seconds to complete on older versions of OS X. The "-o yes" option removes the KeyAccess pkg receipts from /Library/Receipts which then forces the update_prebinding step to have no effect. For more information on prebinding, search for "Software Distribution: PackageMaker and Installer features" on the Apple developer web site.
|
Related TopicsK2 Getting Started- Installation Client Deployment k2clientconfig.exe Help Index |