I'm trying to suspend or "sleep" a specific line in a bash script running in OSX. The script runs at startup before login. I'm not seeing the results I'm expecting. In other words no matter what time I specify after "sleep" the script still moves right along with no delay what so ever. However when I run the script after login, the "sleep" command seems to work just fine.
Is it possible that the command file "sleep" isn't in the path before login or before my script runs? Would it help if I placed the path to sleep before the command? If so where does "sleep" live?
Is there another approach or alternative command I could try?
Thanks
#!/bin/bash
#Create the bin directory
sudo mkdir /usr/local/bin
sleep 10
#Copy the files to the Hard Drive
sudo cp /Volumes/NO\ NAME/adbind.bash /usr/local/bin/adbind.bash
sudo cp /Volumes/NO\ NAME/com.sjusd.adbind.plist /Library/LaunchDaemons/com.sjusd.adbind.plist
#Fix permissions
sudo chown root:wheel /usr/local/bin
sudo chmod 755 /usr/local/bin
sudo chown root:wheel /Library/LaunchDaemons/com.sjusd.adbind.plist
sudo chmod 755 /Library/LaunchDaemons/com.sjusd.adbind.plist
exit 0
Dang tough crowd I got a minus 1 LOL
sleep
is btw. usually located in/bin/sleep
.echo $(which sleep)
at start of your script, for test your question.