You are not logged in.

#1 2008-03-17 22:29:10

genisis300
Member
From: Uk
Registered: 2008-01-15
Posts: 284

if exist

Hi All,

I'm setting up my Laptop to auto-mount an NFS Share point only if the computer can be found.

so is there a bash command that i can use to see if an ip address is active?

Thanks
Matthew


"is adult entertainment killing our children or is killing our children entertaining adults?" Marilyn Manson

Offline

#2 2008-03-17 22:56:45

gothmog.todi
Member
From: Austria
Registered: 2007-07-18
Posts: 120

Re: if exist

one way would be to ping the server in question. but I don't know if there is a way to use it in scripts. And it is probably better to use netcat anyway. Maybe something like this:
nc -z <address> <port> && <command if port is open>

Offline

#3 2008-03-18 01:58:03

tigrmesh
IRC Op
From: Florida, US
Registered: 2007-12-11
Posts: 794

Re: if exist

Hi,
This may help with setting up your fstab:  http://kmandla.wordpress.com/2008/03/17 … istro-nfs/.

Offline

Board footer

Powered by FluxBB