From zappa.fef.com!real-alvin Wed Oct 14 13:25:40 1998 From: "Larry M. Augustin" Date: Wed, 14 Oct 1998 06:16:12 -0700 (PDT) To: Bill Janssen Cc: "Larry M. Augustin" , svlug@svlug.org Subject: Re: [svlug] automount using NIS maps on RedHat 5.1? In-Reply-To: <0q8xQBsB0KGWAJdY0F@holmes.parc.xerox.com> References: <98Oct13.142250pdt."404606"@watson.parc.xerox.com> <13859.54076.439789.268262@cray.varesearch.com> <0q8xQBsB0KGWAJdY0F@holmes.parc.xerox.com> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <13860.41403.883267.642134@cray.varesearch.com> Sender: owner-svlug@svlug.org Precedence: bulk X-Alternate-URL: http://www.svlug.org X-Mascot: penguin X-OS: Linux svlug.svlug.org 2.0.30 #3 Thu Aug 14 14:47:34 PDT 1997 i486 unknown Ah. The script has changed in the newer release. It used to be the case that if a file by the name did not exist, the script try a yp map also. It looks to me like that's not the case anymore. Well, here's the quick and easy answer. Just run: /usr/sbin/automount /directory yp yp-map-name Where "/directory" is the directory and yp-map-name is the name of the yp map. I see that the script now looks for a yp map named auto.master, and starts automount using the "yp" flag for any maps it lists. So: 1. create a yp map named auto.master. 2. Put any yp autofs maps into the yp auto.master file. Larry FYI from the autofs rc script: # # Check for YellowPage maps to be loaded # if [ -e /usr/bin/ypcat ] && [ `ypcat -k auto.master 2>/dev/null | wc -l` -gt 0 ] then ypcat -k auto.master | ( while read dir map options do if [ ! -z "$dir" -a ! -z "$map" \ -a x`echo "$map" | cut -c1` != 'x-' ] then map=`echo "$map" | sed -e 's/^auto_/auto./'` if echo $options | grep -- '-t' >/dev/null 2>&1 ; then mountoptions="--timeout $(echo $options | \ sed 's/^.*-t\(imeout\)*[ \t]*\([0-9][0-9]*\).*$/\2/g')" fi options=`echo "$options" | sed -e ' s/--*t\(imeout\)*[ \t]*[0-9][0-9]*//g s/\(^\|[ \t]\)-/\1/g'` echo "/usr/sbin/automount $mountoptions $dir yp $map $options $localoptions" fi done ) fi } Bill Janssen writes: > Excerpts from direct: 13-Oct-98 [svlug] automount using NIS.. "Larry M. > Augustin"@vare (880) > > > 3. Put your map name in /etc/auto.master (see the autofs rc script > > that starts autofs and reads auto.master). > > What's the syntax for this step? I read the autofs script, and saw no > automount daemons with "yp" maps being started from the auto.master > file... Here's the pertinent script, in fact: > > if [ -f /etc/auto.master ] > then > cat /etc/auto.master | sed -e '/^#/d' -e '/^$/d'| ( > while read dir map options > do > if [ ! -z "$dir" -a ! -z "$map" \ > -a x`echo "$map" | cut -c1` != 'x-' ] > then > map=`echo "/etc/$map" | sed -e 's:^/etc//:/:'` > # special: treat -t or --timeout (or any reasonable derivative) > # specially, since it can't be made a normal mount option. > if echo $options | grep -- '-t' >/dev/null 2>&1 ; then > mountoptions="--timeout $(echo $options | \ > sed 's/^.*-t\(imeout\)*[ \t]*\([0-9][0-9]*\).*$/\2/g')" > fi > options=`echo "$options" | sed -e ' > s/--*t\(imeout\)*[ \t]*[0-9][0-9]*//g > s/\(^\|[ \t]\)-/\1/g'` > if [ -x $map ]; then > echo "/usr/sbin/automount $mountoptions $dir program $map $options $localoptions" > elif [ -f $map ]; then > echo "/usr/sbin/automount $mountoptions $dir file $map $options $localoptions" > else > echo "/usr/sbin/automount $mountoptions $dir `basename $map` $options $localoptions" > fi > fi > done > ) > fi > > Bill > > -- > echo "unsubscribe svlug" | mail majordomo@svlug.org > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to unsubscribe -- echo "unsubscribe svlug" | mail majordomo@svlug.org ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to unsubscribe