ok i need to test to make sure a remote fs is mounted.
im not finding anything.
the shell is ksh. wish i could tell you which version but it is the default version shipped w/ solaris 8.
df -Fnfs
that will give me a list of remotes..... mmm possably this is as close as i get?
Ygor
2
Maybe look at /etc/mnttab
going that route requires alot of work.
sucks i cant find any test condtions for filesystems.
How about:
df -n /usr/share | read junk junk fstype
[[ $fstype = nfs ]] && echo mounted
kduffin
5
You could always key off the return, for example:
df -Fnfs /usr/share || echo "/usr/share not mounted"
or better yet
df -Fnfs /usr/share || logger -p local2.err -t NFS "ERROR: /usr/share not mounted"
I like to feed syslog and use swatch or logwatch to handle errors. Like always, there are a million ways to accomplish the same task.
There are centralized tools out there for system health checks that can include watching mounts - Big Brother is a good example.
Cheers,
Keith