Skip to main content
Solved

Execution Error for erase-install.sh

  • December 3, 2021
  • 1 reply
  • 0 views

Fluffy
Forum|alt.badge.img+10
  • Honored Contributor
  • 209 replies

I have erase-install.sh (version 25.0) deployed to a computer for testing and get an execution error when running a script with commands.

The script with commands:

sh /Library/Management/erase-install/erase-install.sh --version=11.5.2 --check-power --erase --depnotify

The result:

execution error: /Library/Management/erase-install/erase-install.sh: line 1578: syntax error near unexpected token `>'
/Library/Management/erase-install/erase-install.sh: line 1578: `exec > >(tee "${LOG_FILE}") 2>&1' (2)

I am quite green when it comes to scripting languages, so this is over my head other than my understanding there may be a bad syntax somewhere. Can anyone give me some guidance on if I need to edit the script or if I need to adjust a setting somewhere?

For context, these are the couple of lines above the line with the error:

# all output from now on is written also to a log file
LOG_FILE="$workdir/erase-install.log"
exec > >(tee "${LOG_FILE}") 2>&1

 

Best answer by Fluffy

May have found the culprit. Removed sh from the beginning of the script with commands and I am now getting DEPNotify prompts. Will observe if it runs all the way through correctly.

View original
Did this topic help you find an answer to your question?

1 reply

Fluffy
Forum|alt.badge.img+10
  • Author
  • Honored Contributor
  • 209 replies
  • Answer
  • December 3, 2021

May have found the culprit. Removed sh from the beginning of the script with commands and I am now getting DEPNotify prompts. Will observe if it runs all the way through correctly.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings