Posted on 06-26-2017 03:53 PM
Our environment wants us to upgrade all Macs to 10.12.5 (~300 machines)
We've previously cached the package on user's machines, then allow them to upgrade through Self Service.
How are some of you forcing 10.12.5 updates for the user's that do not want to do it self service?
Solved! Go to Solution.
Posted on 06-26-2017 04:09 PM
I'm using the macOSUpgrade script here:
Just go through and make sure the variables are all good, etc. You can just run this in a policy.
Posted on 06-26-2017 04:09 PM
I'm using the macOSUpgrade script here:
Just go through and make sure the variables are all good, etc. You can just run this in a policy.
Posted on 06-26-2017 04:42 PM
That's awesome. Looks like I can cache the installer early on the machines that need it, and have them run it in self service until a specified date... then after the date, I can run this as a policy on recurring check-in.
Thanks!
Posted on 06-27-2017 09:08 AM
Am I the only one that is getting circular URL run-arounds in some of the posts here? Clicking on the URL above posted by @znilsson , I just get a new page with this page...
Used three browsers with the same results (yes, I can search git for the appropriate article).
Posted on 06-27-2017 09:09 AM
@scottb I had the same issue. Thought my computer was broken for a minute. I ended up copying and pasting his link and it worked.
Posted on 06-27-2017 09:12 AM
@bbot yes, I do that too...but we shouldn't have too ;)
Posted on 06-27-2017 09:46 AM
Sorry, I accidentally swapped the URL and the URL text in my original link. I fixed it.
Posted on 06-27-2017 10:21 AM
I keep having an issue on my desktop computers with this script stating its not plugged into power and/or doesn't have 15gb free. Wondering if anyone else has seen this.
Gabe Shackney
Princeton Public Schools
Posted on 06-27-2017 11:38 AM
@gshackney The log should be echoing the specific reason. The AC power detection line in the script is this:
/usr/bin/pmset -g ps
Just run that in Terminal on one of your desktop Macs. I'm on a Mini, and the result for that line on mine is "Now drawing from 'AC Power'". The script uses wildcards around "AC Power" to determine if you're connected to power or not, so if you're on a desktop, you should be getting the result Now drawing from 'AC Power' and consequently should not be throwing the "not plugged into power" error.
The free space section first checks to see if you're on 10.12 or not, then runs this:
/usr/sbin/diskutil info /
So same thing, try running that on one of your desktop Macs in Terminal. The script makes an adjustment for the line it looks for via grep depending on if you're on 10.12 or 10.11 or lower, because Apple changed the wording. In 10.12 it's "available space" and prior to that it was "free space".
But the script should report either one correctly as it checks the OS version first. Regardless, run the above command on one of your desktop Macs and look for the "Volume Available Space" line, if you're on 10.12.x. The script looks at the end of the line for the percentage of free space, and if that number is <15% then it throws the error.
Posted on 06-27-2017 01:06 PM
@Rosko is the original author of the script. Maybe he can shed some light on issues as well?
Posted on 06-27-2017 04:12 PM
If any one else is having issues one machines that have over a TB of free space reporting under 15GB
Replace the free space check with
##Check if free space > 15GB
freeSpace=$( df -g / | grep "/dev/" | awk '{print $4}' )
Posted on 06-28-2017 04:19 PM
Interesting @a.stonham ...I've never ran into this as none of my machines have over a TB of disk space. I will do some testing and update the workflow on GitHub.
Excellent find! If you have any other gotchas, feel free to contribute on GitHub.
@gshackney did that fix the issue for you?
Posted on 06-29-2017 12:00 PM
Yes it did when I replaced the lines under check if free space with:
##Check if free space > 15GB
freeSpace=$( df -g / | grep "/dev/" | awk '{print $4}' )
if [[ ${freeSpace%.*} -ge 15 ]]; then
spaceStatus="OK"
/bin/echo "Disk Check: OK - ${freeSpace%.*}GB Free Space Detected"
else
spaceStatus="ERROR"
/bin/echo "Disk Check: ERROR - ${freeSpace%.*}GB Free Space Detected"
fi
Seemed to continue without issue.
Gabe Shackney
Princeton Public Schools
Posted on 06-29-2017 02:40 PM
When I use /usr/sbin/diskutil info / | grep "Available Space" | awk '{print $4}', i get 155.9
When I use df -g / | grep "/dev/" | awk '{print $4}', I get 144.
Any idea why there's a difference in available free space?