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

quick scripting 'is /P/Q mounted'

A while back, Pierre Gaston posted this little tidbit to quickly
determine if my network is up:
    [ "$(</sys/class/net/eth0/operstate)" = 'up' ]

Now I wonder if there is a similar file in /sys that would tell if
anything is mounted on a particular directory. I've browsed /sys but
not found what I'm looking for.

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').


Life is a suicide mission.
    - Orson Scott Card

Reply to: