Make it a shell function instead.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Test tests for internet connectivity.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>