pelibali wrote:
Hi,
I have a perl-script to modify the system-time of my laptop. While I was connected to my university's broadband, I could run this via cron once per day. Now I have only dial-up at my home, so really can't determine whether I will be online, when this script runs. I would pretty much modify the script e.g. just to avoid errors mailed to me, that first it should check that we are online (dialed-in) or not and do setting the time only in the first case. My first idea was to ping e.g. www.google.com or a similar always-on machine, but I didn't manage to interpret it.
Does anyone have a few-line home-baked idea for such a task and would share it with me?
You can always grep the output of ifconfig, to see if you have an address assigned by your ISP. However, what problems were you having with pinging google? That's a very easy test to do. -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com