-if [ -f /etc/autofs/auto.master ]
-then
- cat /etc/autofs/auto.master | sed -e '/^#/d' -e '/^$/d'| (
- while read dir map options
- do
- if [ ! -z "$dir" -a ! -z "$map" \
- -a x`echo "$map" | cut -c1` != 'x-' ]
- then
- map=`echo "/etc/autofs/$map" | sed -e 's:^/etc\/autofs//:/:'`
- options=`echo "$options" | sed -e 's/\(^\|[ \t]\)-/\1/g'`
- if [ -x $map ]; then
- echo "$DAEMON --timeout $TIMEOUT $dir program $map $options"
- elif [ -f $map ]; then
- echo "$DAEMON --timeout $TIMEOUT $dir file $map $options"
- else
- echo "$DAEMON --timeout $TIMEOUT $dir `basename $map` $options"
+if [ -f /etc/autofs/auto.master ]; then
+ cat /etc/autofs/auto.master | sed -e '/^#/d' -e '/^$/d'| (
+ while read dir map options; do
+ if [ ! -z "$dir" -a ! -z "$map" \
+ -a x`echo "$map" | cut -c1` != 'x-' ]; then
+ maptype=`echo $map | cut -f1 -d:`
+ if [ "$maptype" = "$map" ]; then
+ map=`echo "/etc/autofs/$map" | sed -e 's:^/etc\/autofs//:/:'`
+ options=`echo "$options" | sed -e 's/\(^\|[ \t]\)-/\1/g'`
+ if [ -x $map ]; then
+ echo "$DAEMON --timeout $TIMEOUT $dir program $map $options"
+ elif [ -f $map ]; then
+ echo "$DAEMON --timeout $TIMEOUT $dir file $map $options"
+ else
+ echo "$DAEMON --timeout $TIMEOUT $dir `basename $map` $options"
+ fi
+ else
+ map=`echo $map | cut -f2- -d:`
+ if [ ! -z "$map" ]; then
+ if [ "$maptype" = "file" ]; then
+ map=`echo "/etc/autofs/$map" | sed -e 's:^/etc\/autofs//:/:'`
+ fi
+ echo "$DAEMON --timeout $TIMEOUT $dir $maptype $map $options"
+ fi
+ fi