Hi!



Gesendet von:   [EMAIL PROTECTED]
An:     <[EMAIL PROTECTED]>
Kopie:  "H. Peter Anvin" <[EMAIL PROTECTED]>
Thema:  direct map



> Hi,
>
> i don't dare to ask when they'll be available. ;-)
>
> before i reinvent the wheel: does anybody have
> functioning workarounds? i was thinking having
> a program /etc/auto_direct which nis/ypcats
> the network table and creates the links/mountpoints
> for me.

something like

in /etc/auto.master:

/net  /etc/auto.net

with auto.net beeing a script *and* set executable:

#!/bin/sh
key=$1
opts="-fstype=nfs,hard,intr,nodev,nosuid,nonstrict"

SHOWMOUNT="/usr/lib/autofs/showmount --no-headers -e $key"

$SHOMOUNT | sort +0 | \

        awk -v key="$key" -v opts="$opts" -- '
        BEGIN   { ORS=""; first=1 }
                { if (first) { print opts; first=0 }; print "\\\n\t" $1,
key ":" $1 }
        END     { if (!first) print "\n"; else exit 1 }


after restarting autofs you may

cd /net/myhost.mydomain/someexport/...

Was it what you thought of?

--
Thomas


Reply via email to