SLES AutoMounter

Damir Dezeljin programing at mbss.org
Thu Sep 25 10:57:45 CEST 2003


Hi.

A mi zna kdo pomagati nastaviti NFS automounter na Suse SLES linuxu.

Trenutno imam nastavljeno sledece:
----
auto.master:
--- start ---
/net     /etc/auto.net   ro,intr,rsize=8192,wsize=8192
--- end ---

auto.net:
--- start ---
#!/bin/sh

# $Id: //depot/autofs-4.0/samples/auto.net#6 $

# 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"

# add "nosymlink" here if you want to suppress symlinking local
filesystems
# add "nonstrict" to make it OK for some filesystems to not mount
opts="-fstype=nfs,intr,nodev,nosuid,nonstrict"

# Showmount comes in a number of names and varieties.  "showmount" is
# typically an older version which accepts the '--no-headers' flag
# but ignores it.  "kshowmount" is the newer version installed with knfsd,
# which both accepts and acts on the '--no-headers' flag.
#SHOWMOUNT="kshowmount --no-headers -e $key"
#SHOWMOUNT="showmount -e $key | tail +2"

# 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 " \\\n\t" $1, key
              ":" $1 }
    END     { if (!first) print "\n"; else exit 1 }
    '
--- end ---



V /var/log/messages ne napise nic uporabnega (ne vem kako vklopiti
debuging).

Hvala in lp,
Dezo




More information about the lugos-list mailing list