Bug 19063 - NIS map case pb in init script
Summary: NIS map case pb in init script
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: autofs
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-13 17:23 UTC by Need Real Name
Modified: 2007-04-18 16:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-10-13 17:23:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2000-10-13 17:23:12 UTC
Hello,

I found a problem in autofs for a NIS map case on Linux Red Hat 6.2,
autofs-3.1.4-4.i386.rpm.

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 ]
  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
(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 : )
  ...
  else
      echo "$DAEMON $mountoptions $dir `basename $map` $options
$localoptions"
  ...
(by : )
  ...
  else
      echo "$DAEMON $mountoptions $dir $maptype `basename $map` $options
$localoptions"
  ...				       ^^^^^^^^
---------------------------------------------------------------------------

Is it possible to do something in this way for a next version  but before
rh7.0?

Thanks,

Best regards,

Eric Ragusi
-----------------------------------------------------------------------------
 INRIA Rhone-Alpes - 655 Avenue de l'Europe - 38330 Montbonnot Saint-Martin
 France
 System Administrator
 Email: Eric.Ragusi 
-----------------------------------------------------------------------------

Comment 1 Nalin Dahyabhai 2000-10-24 19:51:58 UTC
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.