Maintain backwards compatibility w/ local file maps w/o etc.
PATCH 1/1 Maintain backwards compatibility w/ local file maps w/o etc.
This patch maintains the same behavior as in previous versions of rc.autofs.in. In the past you could have the following in your auto.master file and it would test to see if there was a local /etc/auto.misc file, and if there was it would use it.
/misc auto.misc
Now, it doesn't check. I've attached a patch that fixes this behavior (I think debian does the same thing with their autofs patches as well).
Thanks,
Chris
--- autofs-4.1.3/samples/rc.autofs.in.filemap-etc-append
2004-10-20 11:47:05.227372963 -0500
+++ autofs-4.1.3/samples/rc.autofs.in 2004-10-20 11:47:06.947345831
-0500
@@ -206,6 +206,9 @@
map=`echo /etc/$map | sed 's^//^/^g'`
elif [ -f "$map" ]; then
maptype=file
+ elif [ -f "/etc/$map" ]; then
+ maptype=program
+ map=`echo /etc/$map | sed 's^//^/^g'`
elif [ "$map" = "hesiod" -o "$map" = "userhome" ] ;then
maptype=$map
map=
Ian Kent
maintainerQuoted 9 lines · Chris Feist
This patch maintains the same behavior as in previous versions of rc.autofs.in. In the past you could have the following in your auto.master file and it would test to see if there was a local
/etc/auto.miscfile, and if there was it would use it./misc auto.misc
Now, it doesn't check. I've attached a patch that fixes this behavior (I think debian does the same thing with their autofs patches as well).
But this is a file map not a program map?
Ian
Quoted 2 lines
But this is a file map not a program map?
Yes, in the past (3.1.7 & 4.0.0) autofs would check for entries in the /etc/ directory even if it wasn't included in the auto.master file.
So, the following two files used to do the same thing:
File A:
/home /etc/auto.home
File B:
/home auto.home
So when people upgrade from 3.1.7 or 4.0.0 to 4.1.3 their maps end up breaking.
Thanks,
Chris
Ian Kent
maintainerQuoted 8 lines · Chris Feist
Quoted 2 lines
But this is a file map not a program map?
Yes, in the past (3.1.7 & 4.0.0) autofs would check for entries in the
/etc/directory even if it wasn't included in the auto.master file.So, the following two files used to do the same thing:
Quoted 8 lines
File A:
/home/etc/auto.homeFile B:
/home auto.homeSo when people upgrade from 3.1.7 or 4.0.0 to 4.1.3 their maps end up breaking.
Point taken.
But the patch doesn't appear to fix that problem.
Can you explain?
Ian
Quoted 6 lines
But the patch doesn't appear to fix that problem.
Can you explain?Ian
Oops, sorry about that. I didn't send you the correct version of the patch. The problem is in the added lines, it says 'maptype=program' it should say 'maptype=file'... Here's the corrected patch...
Thanks,
Chris
s-4.1.3/samples/rc.autofs.in.filemap-etc-append
2004-10-20 11:47:05.227372963 -0500
+++ autofs-4.1.3/samples/rc.autofs.in 2004-10-20 11:47:06.947345831
-0500
@@ -206,6 +206,9 @@
map=`echo /etc/$map | sed 's^//^/^g'`
elif [ -f "$map" ]; then
maptype=file
+ elif [ -f "/etc/$map" ]; then
+ maptype=file
+ map=`echo /etc/$map | sed 's^//^/^g'`
elif [ "$map" = "hesiod" -o "$map" = "userhome" ] ;then
maptype=$map
map=