HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free and registered users see less advertising! If you just want to browse through the existing questions, just select the forum that you want to visit from the selection below. Otherwise, click here to register!. We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Discovery of a computer on the network

I am still working on remodeling a backup shell script. It already works, but I can't leave it alone...
Right now, I have the script set to wake up my remote server using ether-wake, then sleep for abour 3 minutes so the system can boot and get ready for some rsync transfers. Well, the boot time isn't consistent, it's just an estimate. So, instead of my hard-coding 'sleep 180', I am trying to figure out a way to better 'probe' to see if the computer is booted and ready or not.
I could only think of two options:
1) Ping the server's address, then somehow grep the results for replies, and output those results to a file. Use a if/then loop to see if the file exists. If so, continue with the program. If not, wait a few seconds. In theory, if the server wasn't awake yet, no replies would be received, therefore, the file shouldn't exist, and my system should wait a few seconds.
2) Write a simple boot script to use scp to copy some data/file to my client machine. Once again, use an if/then to see if the file exists. If so, continue, if not, wait a few.

I know that these probably aren't ideal as I haven't been around too much, so I was wondering if someone has a better suggestion?