Re: Detecting ro Filesystem
Bernd Eckenfels <firstname.lastname@example.org> writes:
> On Sun, May 04, 2003 at 04:27:49PM +0100, email@example.com wrote:
> > You could parse the output of /proc/mounts and see that way...
> In that case you must do a longest match on the output, and make sure you
> use a correct physical path (i.e. resolv all symlinks).
> # realpath /opt
> # LANG=C mount | grep "on /usr/local/opt"
> # LANG=C mount | grep "on /usr/local"
> /dev/vg0/usr_lv on /usr/local type xfs (rw)
Wouldn't it be easier to just do a "df `realpath $filename`" to get
the mount point?
Stephen L. Peters firstname.lastname@example.org
GPG fingerprint: A1BF 5A81 03E7 47CE 71E0 3BD4 8DA6 9268 5BB6 4BBE
"`Just this once' is once too much, for once they've onced,
they'll want to once once more." -- Urinetown: The Musical