File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535# as well as to address changes Apple has made to the ability to complete macOS upgrades
3636# silently.
3737#
38- # VERSION: v2.5
38+ # VERSION: v2.5.1
3939#
4040# REQUIREMENTS:
4141# - Jamf Pro
5050# Written by: Joshua Roskos | Professional Services Engineer | Jamf
5151#
5252# Created On: January 5th, 2017
53- # Updated On: January 30th , 2018
53+ # Updated On: February 5th , 2018
5454#
5555# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
5656
@@ -104,6 +104,9 @@ icon="$OSInstaller/Contents/Resources/InstallAssistant.icns"
104104# #Get Current User
105105currentUser=$( stat -f %Su /dev/console )
106106
107+ # #Check if FileVault Enabled
108+ fvStatus=$( /usr/bin/fdesetup status )
109+
107110# #Check if device is on battery or ac power
108111pwrAdapter=$( /usr/bin/pmset -g ps )
109112if [[ ${pwrAdapter} == * " AC Power" * ]]; then
@@ -269,7 +272,7 @@ if [[ ${pwrStatus} == "OK" ]] && [[ ${spaceStatus} == "OK" ]]; then
269272 jamfHelperPID=$( echo $! )
270273 fi
271274 # #Load LaunchAgent
272- if [[ ${currentUser} != " root" ]]; then
275+ if [[ ${fvStatus} == " FileVault is On. " ]] && [[ ${ currentUser} != " root" ]]; then
273276 userID=$( id -u ${currentUser} )
274277 launchctl bootstrap gui/${userID} /Library/LaunchAgents/com.apple.install.osinstallersetupd.plist
275278 fi
You can’t perform that action at this time.
0 commit comments