-if [ -e /usr/bin/ypcat ] && [ `ypcat -k auto.master 2>/dev/null | wc -l` -gt 0 ]
-then
- ypcat -k auto.master | (
- while read dir map options
- do
- if [ ! -z "$dir" -a ! -z "$map" \
- -a x`echo "$map" | cut -c1` != 'x-' ]
- then
- map=`echo "$map" | sed -e 's/^auto_/auto./'`
- if echo $options | grep -- '-t' >/dev/null 2>&1 ; then
- mountoptions="--timeout $(echo $options | \
- sed 's/^.*-t\(imeout\)*[ \t]*\([0-9][0-9]*\).*$/\2/g')"
- fi
- options=`echo "$options" | sed -e '
- s/--*t\(imeout\)*[ \t]*[0-9][0-9]*//g
- s/\(^\|[ \t]\)-/\1/g'`
- echo "$DAEMON --timeout $TIMEOUT $mountoptions $dir yp $map $options"
- fi
- done
- )
+if is_yes $USE_YP; then
+ if [ -e /usr/bin/ypcat ] && \
+ [ `ypcat -k auto.master 2>/dev/null | wc -l` -gt 0 ]; then
+ ypcat -k auto.master | (
+ while read dir map options; do
+ if [ ! -z "$dir" -a ! -z "$map" \
+ -a x`echo "$map" | cut -c1` != 'x-' ]; then
+ map=`echo "$map" | sed -e 's/^auto_/auto./'`
+ if echo $options | \
+ grep -- '-t' >/dev/null 2>&1; then
+ mountoptions="--timeout $(echo $options | \
+ sed 's/^.*-t\(imeout\)*[ \t]*\([0-9][0-9]*\).*$/\2/g')"
+ fi
+ options=`echo "$options" | sed -e '
+ s/--*t\(imeout\)*[ \t]*[0-9][0-9]*//g
+ s/\(^\|[ \t]\)-/\1/g'`
+ echo "$DAEMON --timeout $TIMEOUT ${OPTIONS} $mountoptions \
+ $dir yp $map $options"
+ fi
+ done
+ )
+ fi