diff options
author | dteske <dteske@FreeBSD.org> | 2016-12-13 04:43:03 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2016-12-13 04:43:03 +0000 |
commit | 21981f8367ff19e29200058647ad6a03567cb788 (patch) | |
tree | 7a348c4cf578961c10128c73ad8418a51836ecc6 | |
parent | cf5e14dbc109e17d46faf078fc83ebe9ace22daa (diff) | |
download | FreeBSD-src-21981f8367ff19e29200058647ad6a03567cb788.zip FreeBSD-src-21981f8367ff19e29200058647ad6a03567cb788.tar.gz |
MFC r306009 [trasz]:
Make autofs(5) -media map also use "async" and "noatime" for ext2fs(5).
-rwxr-xr-x | etc/autofs/special_media | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/etc/autofs/special_media b/etc/autofs/special_media index c0fe587..86824b6 100755 --- a/etc/autofs/special_media +++ b/etc/autofs/special_media @@ -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. |