Bug 19063 - NIS map case pb in init script
NIS map case pb in init script
Product: Red Hat Linux
Classification: Retired
Component: autofs (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2000-10-13 13:23 EDT by Need Real Name
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-10-13 13:23:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2000-10-13 13:23:12 EDT

I found a problem in autofs for a NIS map case on Linux Red Hat 6.2,

Like documented (man 5 auto.master) I would like to use a local auto.master
file and a NIS map auto.home: 

> cat /etc/auto.master 
/home   yp:auto.home	--timeout 60

But, this case is not treated in the /etc/rc.d/init.d/autofs file. 
If you use a local /etc/auto.master file, you must use a local map. And if
you use a NIS auto.master file, you must use a NIS map too. 

Is it a known pb?

If not, I propose a correction in this init script that could be (look like
an old version):
  if [ -f /etc/auto.master ]
      cat /etc/auto.master | sed -e '/^#/d' -e '/^$/d'| (
      while read dir map options
	  if [ ! -z "$dir" -a ! -z "$map" \
		-a x`echo "$map" | cut -c1` != 'x-' ]
(add in line 83)
--------->   if echo $map | grep -- ':' ; then
--------->	maptype=`echo $map | cut -d ':' -f 1`
--------->	map=`echo $map | cut -d ':' -f 2-`
--------->   fi
	     #convert -t to --timeout and save elsewhere
	     map=`echo "/etc/$map" | sed -e 's:^/etc//:/:'`

(And replace line 98 : )
      echo "$DAEMON $mountoptions $dir `basename $map` $options
(by : )
      echo "$DAEMON $mountoptions $dir $maptype `basename $map` $options
  ...				       ^^^^^^^^

Is it possible to do something in this way for a next version  but before


Best regards,

Eric Ragusi
 INRIA Rhone-Alpes - 655 Avenue de l'Europe - 38330 Montbonnot Saint-Martin
 System Administrator
 Email: Eric.Ragusi@inrialpes.fr 
Comment 1 Nalin Dahyabhai 2000-10-24 15:51:58 EDT
Version 7 was released last month.  The autofs package included should be doing
a clean merge of the two auto.master maps.  A test version of the package for
use on systems running 6.2 is at http://people.redhat.com/nalin/test/.  (It may
require rebuilding the source package to get it running on a 6.2 system.)

Note You need to log in before you can comment on or make changes to this bug.