File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 119119 fi
120120
121121# Run DEP Notify will run after Apple Setup Assistant and must be run as the end user.
122+ SETUP_ASSISTANT_PROCESS=$( pgrep -l " Setup Assistant" )
123+ until [ " $SETUP_ASSISTANT_PROCESS " = " " ]; do
124+ echo " $( date " +%a %h %d %H:%M:%S" ) : Setup Assistant Still Running. PID $SETUP_ASSISTANT_PROCESS ." >> " $TMP_DEBUG_LOG "
125+ sleep 1
122126 SETUP_ASSISTANT_PROCESS=$( pgrep -l " Setup Assistant" )
123- until [ " $SETUP_ASSISTANT_PROCESS " = " " ]; do
124- echo " $( date " +%a %h %d %H:%M:%S" ) : Setup Assistant Still Running. PID $SETUP_ASSISTANT_PROCESS ." >> " $TMP_DEBUG_LOG "
125- sleep 1
126- SETUP_ASSISTANT_PROCESS=$( pgrep -l " Setup Assistant" )
127- done
127+ done
128+
129+ # Checking to see if the Finder is running now before continuing. This can help
130+ # in scenarios where an end user is not configuring the device.
131+ FINDER_PROCESS=$( pgrep -l " Finder" )
132+ until [ " $FINDER_PROCESS " != " " ]; do
133+ echo " $( date " +%a %h %d %H:%M:%S" ) : Finder process not found. Assuming device is at login screen." >> " $TMP_DEBUG_LOG "
134+ sleep 1
135+ FINDER_PROCESS=$( pgrep -l " Finder" )
136+ done
128137
129- # After the Apple Setup completed. Now safe to grab the current user.
130- CURRENT_USER=$( stat -f " %Su" " /dev/console" )
131- echo " $( date " +%a %h %d %H:%M:%S" ) : Current user set to $CURRENT_USER ." >> " $TMP_DEBUG_LOG "
138+ # After the Apple Setup completed. Now safe to grab the current user.
139+ CURRENT_USER=$( stat -f " %Su" " /dev/console" )
140+ echo " $( date " +%a %h %d %H:%M:%S" ) : Current user set to $CURRENT_USER ." >> " $TMP_DEBUG_LOG "
132141
133142# If SELF_SERVICE_CUSTOM_BRANDING is set to true. Loading the updated icon
134143 if [ " $SELF_SERVICE_CUSTOM_BRANDING " = true ]; then
You can’t perform that action at this time.
0 commit comments