Author: trasz
Date: Tue Sep 20 04:33:58 2016
New Revision: 306009
URL: https://svnweb.freebsd.org/changeset/base/306009

Log:
  Make autofs(5) -media map also use "async" and "noatime" for ext2fs(5).
  
  Suggested by: pfg@
  MFC after:    1 month

Modified:
  head/etc/autofs/special_media

Modified: head/etc/autofs/special_media
==============================================================================
--- head/etc/autofs/special_media       Tue Sep 20 00:22:35 2016        
(r306008)
+++ head/etc/autofs/special_media       Tue Sep 20 04:33:58 2016        
(r306009)
@@ -38,7 +38,8 @@ print_map_entry() {
        _fstype="$1"
        _p="$2"
 
-       if [ "${_fstype}" = "ntfs" ]; then
+       case "${_fstype}" in
+       "ntfs")
                if [ -f "/usr/local/bin/ntfs-3g" ]; then
                        echo 
"-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid,noatime        
:/dev/${_p}" 
                else
@@ -46,11 +47,14 @@ print_map_entry() {
                            "Cannot mount ${_fstype} formatted device 
/dev/${_p}: Install sysutils/fusefs-ntfs first"
                        exit 1
                fi
-       elif [ "${_fstype}" = "msdosfs" -o "${_fstype}" = "ufs" ]; then
+               ;;
+       "ext2fs" | "msdosfs" | "ufs")
                echo "-fstype=${_fstype},nosuid,noatime,async   :/dev/${_p}" 
-       else
+               ;;
+       *)
                echo "-fstype=${_fstype},nosuid :/dev/${_p}" 
-       fi
+               ;;
+       esac
 }
 
 # Determine map entry contents for the given key and print out the entry.
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to