Posted on 05-30-2014 05:47 AM
I have had a policy that's cached our 10.9.x upgrade packages onto machines. however some of them now have a 10.9.2 and a 10.9.3 (and/or 10.9.0/10.9.1) packages on them because teh user never installed them.
Now when they go to isntall, they have multiple cached packages for the OS adnd the machine kind of flakes out and wont install anything. I found that if I manually removed all the pkgs and then re-pushed the current one then it's fine.
So my question is to get a SG setup that has cached packages has more than 1 on it.
any way to do that? I COuld only find cached packages "Has" <pkg name>.
Posted on 05-30-2014 07:24 AM
One way to do this could be to add criteria along the lines of
Cached packages | does not have | "OS X 10.9.pkg" and Cached packages | does not have | "OS X 10.9.1.pkg" and Cached packages | does not have | "OS X 10.9.2.pkg"
etc, etc.
In addition to the criteria of Has "your package name"
But that seems like a lot of work to me and may to you as well. Its also not guaranteed to catch every case.
The other way would be with an Extension Attribute that counts up the pkg's or dmg's located in the Waiting Room directory. Something like this maybe?
#!/bin/sh
WaitingRoomCount=$( find /Library/Application Support/JAMF/Waiting Room -maxdepth 1 | egrep "pkg$|dmg$" | wc -l )
echo "<result>$WaitingRoomCount</result>"
Only problem with the above EA is that its not going to differentiate from OS X update packages and any other packages or disk images that you may be caching that are NOT OS X updates. Its just counts them all up into a total.
Posted on 08-13-2014 07:35 AM
I thought someone might like a slight tweak (and very slight at that) to this
#!/bin/sh
WaitingRoomCount=$( find /Library/Application Support/JAMF/Waiting Room -maxdepth 1 | egrep "pkg$|dmg$" | wc -l | tr -d ' ' )
echo "<result>$WaitingRoomCount</result>"
This gets rid of the extra spaces the original left and makes is cleaner to scope a smart group to not 0 instead of not like 0 (or 1)