Skip to content

Commit

Permalink
Merge pull request #42 from kc9wwh/fv-authenticated-reboot-workaround
Browse files Browse the repository at this point in the history
v2.5.1
  • Loading branch information
kc9wwh committed Feb 5, 2018
2 parents 4f9cf2c + 3d2936c commit 34ec0f3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions macOSUpgrade.sh
Expand Up @@ -35,7 +35,7 @@
# as well as to address changes Apple has made to the ability to complete macOS upgrades
# silently.
#
# VERSION: v2.5
# VERSION: v2.5.1
#
# REQUIREMENTS:
# - Jamf Pro
Expand All @@ -50,7 +50,7 @@
# Written by: Joshua Roskos | Professional Services Engineer | Jamf
#
# Created On: January 5th, 2017
# Updated On: January 30th, 2018
# Updated On: February 5th, 2018
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

Expand Down Expand Up @@ -104,6 +104,9 @@ icon="$OSInstaller/Contents/Resources/InstallAssistant.icns"
##Get Current User
currentUser=$( stat -f %Su /dev/console )

##Check if FileVault Enabled
fvStatus=$( /usr/bin/fdesetup status )

##Check if device is on battery or ac power
pwrAdapter=$( /usr/bin/pmset -g ps )
if [[ ${pwrAdapter} == *"AC Power"* ]]; then
Expand Down Expand Up @@ -269,7 +272,7 @@ if [[ ${pwrStatus} == "OK" ]] && [[ ${spaceStatus} == "OK" ]]; then
jamfHelperPID=$(echo $!)
fi
##Load LaunchAgent
if [[ ${currentUser} != "root" ]]; then
if [[ ${fvStatus} == "FileVault is On." ]] && [[ ${currentUser} != "root" ]]; then
userID=$( id -u ${currentUser} )
launchctl bootstrap gui/${userID} /Library/LaunchAgents/com.apple.install.osinstallersetupd.plist
fi
Expand Down

0 comments on commit 34ec0f3

Please sign in to comment.