PDA

View Full Version : [SOLVED] Best way to check for an internet connection



lykwydchykyn
October 15th, 2012, 10:01 PM
I'm working on a login script to delay the launch of a program until after the wireless connection (via nm-applet) is setup. My initial thought is to repeatedly grep the output of ifconfig until an ip address can be found, but this seems messy and maybe prone to error.

Does anyone have any advice on a better approach to this task?

trent.josephsen
October 15th, 2012, 10:18 PM
nm-online (http://linux.die.net/man/1/nm-online)?

lykwydchykyn
October 15th, 2012, 10:25 PM
Didn't know that existed; thanks, I will try it!