autofs breaks nis auto.master when there is a tab in nsswitch

Bug #13137 reported by Debian Bug Importer
4
Affects Status Importance Assigned to Milestone
autofs (Debian)
Fix Released
Unknown
autofs (Ubuntu)
Invalid
High
Unassigned

Bug Description

Automatically imported from Debian bug report #296238 http://bugs.debian.org/296238

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #296238 http://bugs.debian.org/296238

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 21 Feb 2005 10:56:38 +0100
From: Peter Palfrader <email address hidden>
To: <email address hidden>
Subject: autofs breaks nis auto.master when there is a tab in nsswitch

Package: autofs
Version: 4.1.3+4.1.4beta2-2
Severity: grave

The diff for etc/init.d/autofs includes:
 #
 # Check for all maps that are to be loaded
 #
 function getschemes()
 {
- if grep -q ^automount: /etc/nsswitch.conf; then
+ if grep -q '^automount:[ \t]' /etc/nsswitch.conf; then
         grep ^automount: /etc/nsswitch.conf | \
                 sed -e 's/^.*://' -e 's/\[.*\]/ /g'
     else
         echo files
     fi
 }

However, the new grep is broken:

| weasel@olga:~$ grep '^automount:[ \t]' /etc/nsswitch.conf
| weasel@olga:~$ grep '^automount:[ ]' /etc/nsswitch.conf
                                    ^^^^ < that's a tab
| automount: files nis

--
Peter

Revision history for this message
In , Peter Palfrader (weasel) wrote : severity of 296238 is important

# Automatically generated email from bts, devscripts version 2.8.10
severity 296238 important

Revision history for this message
In , Steinar H. Gunderson (sesse) wrote : Fixed in 4.1.3+4.1.4beta2-3

severity 296238 grave
reopen 296243
merge 296238 296243
tags 296238 + sarge
thanks

Hi,

#296238 (dupe of #296243) was fixed in the latest autofs upload to sid (which
should enter sarge shortly), but I wrote the wrong bug number in the
changelog (_again_), thus this manual e-mail. Thanks for the bug report. :-)

/* Steinar */
--
Homepage: http://www.sesse.net/

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Mon, 21 Feb 2005 12:53:52 +0100
From: Peter Palfrader <email address hidden>
To: <email address hidden>
Subject: severity of 296238 is important

# Automatically generated email from bts, devscripts version 2.8.10
severity 296238 important

Revision history for this message
In , Isaac Wilcox (bounce-iwilcox) wrote : tab in nsswitch

Bitten by this myself today. grep doesn't speak "\t" AFAICT from the
manpage (so it's not broken, just being misused). I changed it to:
  if grep -q '^automount:[[:blank:]]' /etc/nsswitch.conf; then
which works for me. (But maybe that character class isn't supported by
all greps? *shrug*).

Isaac Wilcox

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 21 Feb 2005 13:41:58 +0100
From: "Steinar H. Gunderson" <email address hidden>
To: <email address hidden>
Cc: <email address hidden>
Subject: Fixed in 4.1.3+4.1.4beta2-3

severity 296238 grave
reopen 296243
merge 296238 296243
tags 296238 + sarge
thanks

Hi,

#296238 (dupe of #296243) was fixed in the latest autofs upload to sid (which
should enter sarge shortly), but I wrote the wrong bug number in the
changelog (_again_), thus this manual e-mail. Thanks for the bug report. :-)

/* Steinar */
--
Homepage: http://www.sesse.net/

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Mon, 21 Feb 2005 12:53:12 +0000
From: Isaac Wilcox <email address hidden>
To: <email address hidden>
Subject: tab in nsswitch

Bitten by this myself today. grep doesn't speak "\t" AFAICT from the
manpage (so it's not broken, just being misused). I changed it to:
  if grep -q '^automount:[[:blank:]]' /etc/nsswitch.conf; then
which works for me. (But maybe that character class isn't supported by
all greps? *shrug*).

Isaac Wilcox

Revision history for this message
Matt Zimmerman (mdz) wrote :

Regression in newer autofs in Debian

Changed in autofs:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.