Posted on 04-18-2013 11:06 AM
Hi all,
Anyone know a way to install cached packages one by one?
Not using a policy per package or install all cached.
Solved! Go to Solution.
Posted on 04-20-2013 03:26 AM
Well, it's a little tedious, but it can be done :-)
Posted on 04-18-2013 11:27 AM
Ben, can you clarify what you're looking for?
Posted on 04-18-2013 11:44 AM
Sure. It's for an ihook window @ logout.
I'd like to notify the user like;
installing cached update 1 of x...
installing cached updated 2 of x...
Posted on 04-18-2013 12:18 PM
Ok, for that I think you'd need to custom script to do the installs using command line installer and not use the built in JAMF functionality, since I don't think you really have any control over it that way, nor any visibility into what its doing. Maybe I'm wrong on that, but I've never found a good way to get feedback from that. Perhaps the sudo jamf installAllCached command? Maybe it has a verbose to get some feedback on progress?
I have a rather long script I've put together for a custom install process we're beginning to use that utilizes cocoaDialog to show the number of updates (along with the name) in a progress bar window, showing real-time progress as each installation happens. I don't know if something like that would be compatible with iHook though. I've heard of it, but never really used it.
Posted on 04-18-2013 12:31 PM
Thanks Mike.
installAllCached does echo out each step, I just wanted to give the end users a kind of progress.
Nvm, probably being too precious about it.
Oh & I'm using iHook & not CocoaDialog as I wanted a progress bar with an image & running @ logout.
Posted on 04-20-2013 03:26 AM
Well, it's a little tedious, but it can be done :-)
Posted on 04-20-2013 04:37 PM
Do they have to be cached?
Our deployment and update system runs with iHook based off manual triggers. Script does other misc tasks and then calls the jamf binary to execute the trigger, everything needed installs and that's it.
Posted on 04-21-2013 06:20 AM
No, they do not have to be cached. We just happen to do all our installs at logout time and want to keep the install time as short as possible. Thus we cache during the day using every15 and then install the cached packages at logout with a notification script.
Posted on 04-21-2013 07:30 PM
As my previous post stated, we have a manual trigger to do updates. This is run through a script running through iHook.
What we do is set the scheduling on the computers to turn themselves on at 2am, execute a policy that installs all of this and restarts the computer. That allows a launchd plist to run the updates over the loginwindow. The computer then updates itself, deletes the update files and turns itself off.
We do it that way to avoid inconveniencing students and staff during operational hours.
08-13-2022 03:05 PM - edited 08-13-2022 03:06 PM
Kind of a late reply, I suppose, but it may help some folks.
The command jamf install is one of the oldest methods in the jamf binary. It will process both DMG and PKG. Recently, I discovered quite by accident that it also can be used for items in the Waiting Room, and that it will clean up cached packages automatically.
Those of you who have been using jamf installAllCached will perhaps find it useful to know that this command is a built-in shortcut that iterates through all items in the Waiting Room, and runs jamf install until they are gone.
Here is an example of how to use jamf install. Through trial and error, I learned that the 'path' and 'package' switches operate slightly differently than the macOS installer command. With the jamf binary, you must specify the -path to the package separately. The -package argument only accepts the filename, and not any path components.
Examples below for comparison:
macOS installer binary:
sudo installer -pkg /path/to/directory/ThePackageFileName.pkg -target /
jamf binary:
sudo jamf install -path /path/to/directory -package ThePackageFileName.pkg -target /
By playing around with it, this is how I accidentally deduced that jamf installAllCached just installs everything in the list one by one, as OP has expressed a desire to do. And when jamf detects the package is in the Waiting Room—it's looking for the corresponding .cache.xml file—it cleans up after a successful installation.
From there, all you need to do is write a script that for-loops through the Waiting Room items and displays jamfHelper or swiftDialog messages to the user about the installation progress.