[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: quick scripting 'is /P/Q mounted'

On 13 March 2018 at 14:40, Mike McClain <mike.junk.46@att.net> wrote:
> If my other computer is South40 and I want to mount South40's /docs
> on my /south40/docs/ directory I can do that. As one script calls
> another I want to know if I need to mount South40 without
> $( mount | grep 'south40/docs').
> Suggestions?

Installing the package util-linux will provide the mountpoint command
which exits true=0 if its argument is in use as a mountpoint. Example:

$ if mountpoint / ; then echo "exit status is $?" ; fi
/ is a mountpoint
exit status is 0

Reply to: