1#!/bin/sh 2# 3# $FreeBSD: releng/11.0/etc/autofs/special_noauto 279955 2015-03-13 12:44:46Z trasz $ 4# 5 6print_available() { 7 sed 's/#.*//' /etc/fstab | awk '$4 ~ /noauto/ { print $2 }' 8} 9 10print_one() { 11 local _mntpoint 12 13 _mntpoint="${1%/}" 14 15 sed 's/#.*//' /etc/fstab | awk ' 16 $2 == "'"${_mntpoint}"'" && $4 ~ /noauto/ { 17 if ($1 ~ /:/) { dev=$1 } else { dev=":"$1 } 18 print "-fstype=" $3 "," $4, dev 19 }' 20} 21 22if [ $# -eq 0 ]; then 23 print_available 24 exit 0 25fi 26 27print_one "$1" 28exit 0 29 30