On Wednesday, July 3, 2002, at 06:18 , Deb wrote:
[..]
> I can't just check for certain filesystems, I have to "know" what is
> mounted at a given time...  But the fact that there is NFS server/
> client game where they no longer make nice - well, I need to discover
> that before issuing the df cmd, methinks.  I suppose I could check
> the log for error messages, but that is frought with other problems.
[..]

by default - all networks solutions are EVIL.

note:

        vladimir: 69:] perl -n -e 'm/^(.*)(?:nfs|autofs)/;\
        print "$1 \n" if $1;' /etc/mnttab
        auto_gax        /net/gax
        -xfn    /xfn
        vladimir:vold(pid196)   /vol
        gax:/export/home        /net/gax/home

p0: the first three things that our waltz through /etc/mnttab
are 'hypothetical entities' - the first being cuteness for
the autofs - the second WackoNeff with /xfn, the third the 'vold'...
The only one of them that actually is a reference to a real live
honest to God, sit right down on the file system nfs cross mounted
file system is that /net/gax/home....

And that is not even a 'fancy pants' nfs cross mount fiasco....
Since we are NOT woofing one 'auto_fs' entry per use who logs
into the host, as some folks do....

p1:
vladimir: 82:] perl -n -e 'm/^([\w\/:\)\(\-]+)\s*([\w\/]+).*((?:nfs|autofs)
)/; print "$1 $2 $3 \n" if ($1 && $2 && $3) ;' /etc/mnttab
auto_gax /net/gax autofs
-xfn /xfn autofs
vladimir:vold(pid196) /vol nfs
gax:/export/home /net/gax/home nfs
vladimir: 83:]

and BOING out you will notice that you have /net/gax and /net/gax/home
that would be contaminated points that you need to dodge.... but
remember that they are children of "/" - and.... well... as long
as you work the deal a bit better..... you can work around it...

p2: the real question remains, why ARE you doing a bland

        system("df -lk");

in a script to begin with....

ciao
drieux

---

The Thing that REALLY sucks is that I can write
that perl one liner faster than I can do it in sed....

Oh the shame....


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to