Closed nverselab closed 1 year ago
Hey @nverselab, thank you for the write up. It seems I am running into the same issues you have listed here. I am able to remedy most of them, but could you please elaborate what you did for point 2 and point 4? Thank you.
@Cillu
2) in the migrator.sh script: In the init_registration() else statement
regex="'[A-Z0-9a-z.-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,3}'"
/bin/launchctl asuser "$currentUID" sudo -u $currentUser defaults write menu.nomad.DEPNotify textField1RegexPattern $regex
And at the begining of the Main Code under Read Configured Options
regex="^((-{1,2})([Hh]$|[Hh][Ee][Ll][Pp])|)$"
if [[ "$1" =~ $regex ]]; then
4) Also in the migrator.sh under the init_registration() function i added a button to the end of both the if and else statement:
if [[ "$promptType" = "username" ]]; then
log "prompting for username"
/bin/launchctl asuser "$currentUID" sudo -u $currentUser defaults write menu.nomad.DEPNotify registrationMainTitle "Enter your username"
/bin/launchctl asuser "$currentUID" sudo -u $currentUser defaults write menu.nomad.DEPNotify textField1Label "Username"
/bin/launchctl asuser "$currentUID" sudo -u $currentUser defaults write menu.nomad.DEPNotify textField1RegexPattern '[A-Z0-9a-z.-_@]'
## Issue - Prompt for user email never shows up. Adding button to trigger registration page.
depnotify "Status: Click the button below to start migrating."
depnotify "Command: ContinueButtonRegister: Begin"
else
## Issue - Regex does not resolve as value. Made it a variable
log "prompting for email"
regex="'[A-Z0-9a-z.-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,3}'"
/bin/launchctl asuser "$currentUID" sudo -u $currentUser defaults write menu.nomad.DEPNotify registrationMainTitle "Enter your email"
/bin/launchctl asuser "$currentUID" sudo -u $currentUser defaults write menu.nomad.DEPNotify textField1Label "Email"
/bin/launchctl asuser "$currentUID" sudo -u $currentUser defaults write menu.nomad.DEPNotify textField1RegexPattern $regex
## Issue - Prompt for user email never shows up. Adding button to trigger registration page.
depnotify "Status: Click the button below to start migrating."
depnotify "Command: ContinueButtonRegister: Begin"
fi
Thank you so much for the detailed response, much appreciated.
Thanks for this and sorry for delay in getting these fixes in.
Just a few notes on adjustments I had to make to get the migrationToolWS1 working in my lab in case anyone else needs some direction:
xattr -dr com.apple.quarantine /usr/local/bin/jq
Hope this helps!