Fix, to fix the ordering of +ypmapname entries in /etc/auto.master
PATCH 1/1 Fix, to fix the ordering of +ypmapname entries in /etc/auto.master
Ian,
This patch will have automount process map entries that refer to yp maps (ie. +auto_master) in the same order as they show up in the /etc/auto.master file. Previously all entries that didn't refer to another yp map were processed before entries refering to a yp map.
For example with the following /etc/auto.master:
/home /etc/auto.home
+auto_master
/misc /etc/auto.misc
In 4.1.3, all maps in auto_master would be included after the /home & /misc line.
With this patch all lines in the auto_master file will be processed after the /home line, but before the /misc line.
Thanks,
Chris
samples/rc.autofs.in renamed from samples/rc.autofs.in.plus-map-ordering +12 -3
@@ -94,10 +94,19 @@ function getfilemounts() { if [ -f /etc/auto.master ] ; then - cat /etc/auto.master | grep -v '^\+' | sed -e '/^#/d' -e '/^$/d' - for nismap in `cat /etc/auto.master | grep '^\+' | sed -e '/^#/d' -e '/^$/d'`; do - catnismap `echo "$nismap" | sed -e 's/^\+//'` + cat /etc/auto.master | sed -e '/^#/d' -e '/^$/d' | ( + while read auto_master_in + do + if [ "`echo $auto_master_in | grep '^+'`" = "" ]; then + echo $auto_master_in + else + for nismap in `cat /etc/auto.master | grep '^\+' | + sed -e '/^#/d' -e '/^$/d'`; do + catnismap `echo "$nismap" | sed -e 's/^\+//'` + done + fi done + ) fi } function getnismounts()
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Ian Kent
maintainerQuoted 12 lines · Chris Feist
Ian,
This patch will have automount process map entries that refer to yp maps (ie. +auto_master) in the same order as they show up in the
/etc/auto.masterfile. Previously all entries that didn't refer to another yp map were processed before entries refering to a yp map.For example with the following
/etc/auto.master:
/home/etc/auto.home
+auto_master
/misc/etc/auto.misc
Quoted 6 lines
In 4.1.3, all maps in
auto_masterwould be included after the /home & /misc line.With this patch all lines in the
auto_masterfile will be processed after the /home line, but before the /misc line.
Seems I'll need a reply template for you Chris.
Thanks as usual.
Ian