Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Nicolas Bonnefon <nickobnf@...>
Subject: Autodetecting NFS maps with autofs
Date: Sat, 10 May 2003 15:57:15 +0200
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@g.o mailing list

Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: [gentoo-user] Why headers? was:Mismatch between gentoo-sources and linux-headers?
Next by thread:
Imagemagick forces freetype to be installed
Previous by date:
Re: [gentoo-user] Why headers? was:Mismatch between gentoo-sources and linux-headers?
Next by date:
Imagemagick forces freetype to be installed


Updated Jun 17, 2009

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.