Skip to content

Commit 34ec0f3

Browse files
authored
Merge pull request #42 from kc9wwh/fv-authenticated-reboot-workaround
v2.5.1
2 parents 4f9cf2c + 3d2936c commit 34ec0f3

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

macOSUpgrade.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
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
@@ -50,7 +50,7 @@
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
105105
currentUser=$( 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
108111
pwrAdapter=$( /usr/bin/pmset -g ps )
109112
if [[ ${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

0 commit comments

Comments
 (0)