Bug 19063 - NIS map case pb in init script
NIS map case pb in init script
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: autofs (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brock Organ
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2000-10-13 13:23:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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
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@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.