mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
ZTS: Check the right mount options on FreeBSD
FreeBSD does not support the "devices" and "nodevices" mount options. Do not check these options on FreeBSD. Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10028
This commit is contained in:
parent
325a551232
commit
b11375d74a
@ -62,7 +62,10 @@ log_assert "Verify '-o' will set filesystem property temporarily, " \
|
|||||||
"without affecting the property that is stored on disk."
|
"without affecting the property that is stored on disk."
|
||||||
log_onexit cleanup
|
log_onexit cleanup
|
||||||
|
|
||||||
set -A properties "atime" "devices" "exec" "readonly" "setuid"
|
set -A properties "atime" "exec" "readonly" "setuid"
|
||||||
|
if ! is_freebsd; then
|
||||||
|
properties+=("devices")
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get the specified filesystem property reverse mount option.
|
# Get the specified filesystem property reverse mount option.
|
||||||
@ -78,16 +81,21 @@ function get_reverse_option
|
|||||||
# Define property value: "reverse if value=on" "reverse if value=off"
|
# Define property value: "reverse if value=on" "reverse if value=off"
|
||||||
if is_linux; then
|
if is_linux; then
|
||||||
set -A values "noatime" "atime" \
|
set -A values "noatime" "atime" \
|
||||||
"nodev" "dev" \
|
|
||||||
"noexec" "exec" \
|
"noexec" "exec" \
|
||||||
"rw" "ro" \
|
"rw" "ro" \
|
||||||
"nosuid" "suid"
|
"nosuid" "suid" \
|
||||||
else
|
"nodev" "dev"
|
||||||
|
elif is_freebsd; then
|
||||||
set -A values "noatime" "atime" \
|
set -A values "noatime" "atime" \
|
||||||
"nodevices" "devices" \
|
|
||||||
"noexec" "exec" \
|
"noexec" "exec" \
|
||||||
"rw" "ro" \
|
"rw" "ro" \
|
||||||
"nosetuid" "setuid"
|
"nosetuid" "setuid"
|
||||||
|
else
|
||||||
|
set -A values "noatime" "atime" \
|
||||||
|
"noexec" "exec" \
|
||||||
|
"rw" "ro" \
|
||||||
|
"nosetuid" "setuid" \
|
||||||
|
"nodevices" "devices"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
typeset -i i=0
|
typeset -i i=0
|
||||||
|
Loading…
Reference in New Issue
Block a user