Bug 16643 - sort in /etc/auto.net prevents mounting
sort in /etc/auto.net prevents mounting
Product: Red Hat Linux
Classification: Retired
Component: autofs (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Depends On:
  Show dependency treegraph
Reported: 2000-08-20 12:44 EDT by Michal Jaegermann
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-08-20 12:44:15 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 Michal Jaegermann 2000-08-20 12:44:14 EDT
"New and improved" way of sorting breaks /etc/auto.net script from
'autofs' package.

On one of test machines I have the following output from 'showmount -e'
(don't ask, but it is valid :-):

/                   *.home.front

'auto.net' sorts that in the following way

/                   *.home.front

and none of exported directories gets mounted.  After the following
change (which likely reflects better what was intended anyway):

--- /etc/auto.net~	Fri Aug  4 12:39:05 2000
+++ /etc/auto.net	Sun Aug 20 10:15:15 2000
@@ -20,7 +20,7 @@
 # Newer distributions get this right
 SHOWMOUNT="showmount --no-headers -e $key"
-$SHOWMOUNT | sort +0 | \
+$SHOWMOUNT | sort -k 1,1 | \
 	awk -v key="$key" -v opts="$opts" -- '
 	BEGIN		{ ORS=""; print opts }
 			{ print " \\\n\t" $1, key ":" $1 }

this output of 'sort' becomes

/                   *.home.front

and everything mounts like it is supposed to.

Replacing "sort +0" with "LC_COLLATE=C sort +0" happens to work as
well but with unexpected characters in names may have other, unintended,

Comment 1 Nalin Dahyabhai 2000-08-21 10:00:58 EDT
Host map (auto.net) support in autofs 4 requires kernel features that won't show
up until 2.4.  Please test the autofs packages in
http://people.redhat.com/nalin/test/.  We're reverting to 3.1.5 for this release
because current autofs 4 snapshots don't expire directories correctly due to
recent kernel changes.

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