--- /etc/autofs/special_media 2017-03-01 07:26:38.710082000 -0600 +++ /etc/autofs/special_media 2017-04-18 20:45:23.500193000 -0500 @@ -9,7 +9,7 @@ local _fstype _fstype_and_label _label _p for _p in ${providers}; do - _fstype_and_label="$(fstyp -l "/dev/${_p}" 2> /dev/null)" + _fstype_and_label="$(fstyp -ul "/dev/${_p}" 2> /dev/null)" if [ $? -ne 0 ]; then # Ignore devices for which we were unable # to determine filesystem type. @@ -39,6 +39,15 @@ _p="$2" case "${_fstype}" in + "exfat") + if [ -f "/usr/local/sbin/mount.exfat" ]; then + echo "-mountprog=/usr/local/sbin/mount.exfat,fstype=${_fstype},nosuid :/dev/${_p}" + else + /usr/bin/logger -p info -t "special_media[$$]" \ + "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-exfat first" + exit 1 + fi + ;; "ntfs") if [ -f "/usr/local/bin/ntfs-3g" ]; then echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid :/dev/${_p}" @@ -63,14 +72,14 @@ _key="$1" - _fstype="$(fstyp "/dev/${_key}" 2> /dev/null)" + _fstype="$(fstyp -u "/dev/${_key}" 2> /dev/null)" if [ $? -eq 0 ]; then print_map_entry "${_fstype}" "${_key}" return fi for _p in ${providers}; do - _fstype_and_label="$(fstyp -l "/dev/${_p}" 2> /dev/null)" + _fstype_and_label="$(fstyp -ul "/dev/${_p}" 2> /dev/null)" if [ $? -ne 0 ]; then # Ignore devices for which we were unable # to determine filesystem type.