1
--- autofs-4.1.4.orig/samples/rc.autofs.in 2005-06-10 00:19:26.000000000 +0200
2
+++ autofs-4.1.4/samples/rc.autofs.in 2005-06-10 00:26:29.000000000 +0200
7
- /usr/bin/ypcat -k "$map" 2> /dev/null | sed -e '/^#/d' -e '/^$/d'
9
+ # Append the map's options at the _start_ if there are any options already
10
+ # (ie. myopt -> $2,myopt), otherwise just append them at the end.
11
+ if [ -z "$2" ]; then
12
+ /usr/bin/ypcat -k "$map" 2> /dev/null | sed -e '/^#/d' -e '/^$/d'
14
+ /usr/bin/ypcat -k "$map" 2> /dev/null |
15
+ sed -e '/^#/d' -e '/^$/d' \
16
+ -e "s/^[ \t]*\([^ \t]\+\)[ \t]\+\([^ \t]\+\)[ \t]\+-\([^ \t]\+\)/\1 \2 $2,\3/" \
17
+ -e "s/^[ \t]*\([^ \t]\+\)[ \t]\+\([^ \t]\+\)[ \t]*$/\1 \2 $2/"
21
function getfilemounts()
23
if [ "`echo $auto_master_in | grep '^+'`" = "" ]; then
26
- for nismap in `cat /etc/auto.master | grep '^\+' |
27
- sed -e '/^#/d' -e '/^$/d'`; do
28
- catnismap `echo "$nismap" | sed -e 's/^\+//'`
30
+ cat /etc/auto.master | grep '^\+' | sed -e '/^#/d' -e '/^$/d' | (
31
+ while read map options; do
32
+ catnismap `echo "$map" | sed -e 's/^\+//'` $options