Checking mount points

2002-09-27 Thread Richardson, Tony

What is the easiest way to check if /home/$USER (or some other
directory) has been mounted (either system-wide or user-only)? I know
that I can use regtool (checking both the system and user keys) or parse
the output from mount,  but I was hoping for something as simple as
typing isitmounted /home/$USER and have the unknown isitmounted
command return an appropriate exit status.

I'm trying to write startup scripts so that mount points get set
automatically when running cygwin from a network share (but I don't to
override /home/$USER if that already exists.)

The mount man page seems to refer to a man page for mount-table but I
haven't been able to find it.

Thanks,
Tony Richardson


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Checking mount points

2002-09-27 Thread Robert Collins

On Sat, 2002-09-28 at 00:07, Richardson, Tony wrote:
 What is the easiest way to check if /home/$USER (or some other
 directory) has been mounted (either system-wide or user-only)? I know
 that I can use regtool (checking both the system and user keys) or parse
 the output from mount,  but I was hoping for something as simple as
 typing isitmounted /home/$USER and have the unknown isitmounted
 command return an appropriate exit status.
 
 I'm trying to write startup scripts so that mount points get set
 automatically when running cygwin from a network share (but I don't to
 override /home/$USER if that already exists.)

'mount' should do it.

Cheers,
Rob
-- 
---
GPG key available at: http://users.bigpond.net.au/robertc/keys.txt.
---



signature.asc
Description: This is a digitally signed message part


RE: Checking mount points

2002-09-27 Thread Richardson, Tony



 From: Robert Collins [mailto:[EMAIL PROTECTED]] 
 On Sat, 2002-09-28 at 00:07, Richardson, Tony wrote:
  What is the easiest way to check if /home/$USER (or some other
  directory) has been mounted (either system-wide or 
 user-only)? I know 
  that I can use regtool (checking both the system and user keys) or 
  parse the output from mount,  but I was hoping for something as 
  simple as typing isitmounted /home/$USER and have the unknown 
  isitmounted command return an appropriate exit status.
  
  I'm trying to write startup scripts so that mount points get set 
  automatically when running cygwin from a network share (but 
 I don't to 
  override /home/$USER if that already exists.)
 
 'mount' should do it.

Any suggestions on how to do it?

mount /home/$USER returns not enough arguments and I haven't found a
-check option to mount.

Tony

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




RE: Checking mount points

2002-09-27 Thread Robert Collins

On Sat, 2002-09-28 at 00:56, Richardson, Tony wrote:
 Any suggestions on how to do it?
 
 mount /home/$USER returns not enough arguments and I haven't found a
 -check option to mount.

mount | grep /home/$USER
if empty, not mounted
if not empty, the win32 path that is mounted there.

Rob

-- 
---
GPG key available at: http://users.bigpond.net.au/robertc/keys.txt.
---



signature.asc
Description: This is a digitally signed message part