Because in my deployment I'm launching policies which need to have the local user logged in, I must put on standby all "Enrollment Complete" trigger policies before they start, waiting for the Local User to be created and then logged in.
My idea is to set a first policy which will stop the rest of policies from being launched just looping into a script.
In this script I would call this variable:
CURRENTUSER=stat -f "%Su" /dev/console
and then loop while
[ "$CURRENTUSER" = "_mbsetupuser" ] or [ "$CURRENTUSER" = "root" ] (in this I need help)
finally, I would let the loop stop and begin the rest of the policies flow as soon as the condition changes (e.g. [ "$CURRENTUSER" != "_mbsetupuser" ] )
Please help me getting a script that can achieve what I need..!
Thanks in advance for you effort guys, I really appreciate!!!
