public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-dev] Autodetecting NFS maps with autofs
@ 2003-05-10 13:57 99% Nicolas Bonnefon
  0 siblings, 0 replies; 1+ results
From: Nicolas Bonnefon @ 2003-05-10 13:57 UTC (permalink / raw
  To: gentoo-dev

Hi everybody!

I'm trying to use the executable (shell script) map from debian for 
autofs. This script autodetects exported filesystems on a remote host.
But I can't get it to work on my gentoo box.

Here is the messages i've got from /var/log/messages when i try to 'ls 
/var/autofs/net/outerspace/home': (outerspace is the remote box)

May 10 15:50:19 blackbox automount[60]: attempting to mount entry 
/var/autofs/net/outerspace
May 10 15:50:19 blackbox automount[1567]: lookup(program): looking up 
outerspace
May 10 15:50:19 blackbox automount[1567]: lookup(program): outerspace -> 
-fstype=nfs,hard,intr,nodev,nosuid     /home outerspace:/home    /tmp 
outerspace:/tmp
May 10 15:50:19 blackbox automount[1567]: expanded entry: 
-fstype=nfs,hard,intr,nodev,nosuid    /home outerspace:/home  /tmp 
outerspace//tmp
May 10 15:50:19 blackbox automount[1567]: parse(sun): gathered options: 
fstype=nfs,hard,intr,nodev,nosuid
May 10 15:50:19 blackbox automount[1567]: parse(sun): entry outerspace 
is a multipath entry


This is the script I use (/etc/autofs/auto.net):

#!/bin/sh

# Look at what a host is exporting to determine what we can mount.
# This is very simple, but it appears to work surprisingly well

key="$1"

opts="-fstype=nfs,hard,intr,nodev,nosuid"


# Newer distributions get this right
SHOWMOUNT="/usr/sbin/showmount --no-headers -e $key"

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


Do we need a patched version of autofs to handle these generated maps?
Does anybody have experience with this?
The manpage for autofs(5) seems to tell it should work this way....


--
Nicolas Bonnefon



--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2003-05-10 13:57 99% [gentoo-dev] Autodetecting NFS maps with autofs Nicolas Bonnefon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox