Personal tools
You are here: Home Macintosh Upgrade Mac Agents

Upgrade Mac Agents

by jack — last modified 2007-04-23 14:17

Upgrade Macs that are too old to upgrade natively

Back in the misty old 8.1 and 8.5 days, the Mac agent was basically not upgradable; you had to uninstall and re-install. 8.6 introduced some hope of an in-place upgrade, and with 8.7 it was fairly likely to succeed... however, there are sometimes glitches. If you have them, here's a workaround. There are steps in this which may not be necessary in all situations.

First, copy the .pkg.zip in ldlogon/mac and rename it to .pkg.jpg. There really is a good reason for this... the ldkahuna application will try to unzip anything that it downloads which has a .zip extension. On older clients, this means that it could trigger the Stuffit "buy an upgrade" package, or an error that there's no decompression utility, or a question about where to unzip stuff, or who knows what. I'm specifying .jpg instead of .random-extension because I'm assuming you haven't done a wild-card MIME type; if you have, go for it.

Second, on a Mac, write a script to do the installation. It has to be on a Mac or other Unix system to get the line-endings right. Also be aware that it will be running as root later on, but you're not root: so when you're testing it from Terminal.app, you'll need to sudo bash in order to get the right behavior.

ldinstall.sh

cd /Library/Application\ Support/LANDesk
bin/ldkahuna "http://server/ldlogon/mac/Client87SP2.pkg.jpg"
cd sdcache
unzip -qq Client87SP2.pkg.jpg
cd LDMSClient.pkg/Contents/Resources
chmod 755 VolumeCheck
chmod 755 postflight
chmod 755 postflightKaanapali
chmod 755 postinstaller
chmod 755 preinstall
chmod 755 preupgrade
cd ..\..\..
installer -pkg LDMSClient.pkg -target /

Third, map a drive in Finder and transfer this script to your ldlogon/mac directory. Create a Mac package definition and point it at the script. Schedule this and target the targets. Your 8.7 series clients should be good to go at this point (but then, most of the time you could just schedule an agent update for them anyway).

Unfortunately, your 8.6 and previous clients are going to download the .sh file as the .txt type which IIS thinks it is, stick it in /Library/Application Support/LANDesk/sdcache, and report success. With those, you'll need a second step to complete the upgrade. Go to Manage Scripts, create a new custom script, and add this:

ldinstallpart2.ini

[MACHINES_MACX]
REMEXEC00=chmod a+x /Library/Application\ Support/LANDesk/sdcache/ldinstall.sh, STATUS
REMEXEC01=/Library/Application\ Support/LANDesk/sdcache/ldinstall.sh, STATUS

Now schedule that to all the targets of your first package, and run it. You should be done!

Server Says:
Generally speaking, the Way of the warrior is resolute acceptance of death.
-- Miyamoto Musashi, 1645
Safety First!
203 Days without a Dumpster fire.
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: