Use the checkyesno routine instead of a case statement to
check an rc.conf(5) variable. This is in line with rc.d style.
This commit is contained in:
parent
e27b3ff8b6
commit
82e3bcc0d5
@ -27,17 +27,15 @@ mountd_precmd()
|
|||||||
|
|
||||||
# mountd flags will differ depending on rc.conf settings
|
# mountd flags will differ depending on rc.conf settings
|
||||||
#
|
#
|
||||||
case ${nfs_server_enable} in
|
if checkyesno nfs_server_enable ; then
|
||||||
[Yy][Ee][Ss])
|
|
||||||
if checkyesno weak_mountd_authentication; then
|
if checkyesno weak_mountd_authentication; then
|
||||||
mountd_flags="${mountd_flags} -n"
|
mountd_flags="${mountd_flags} -n"
|
||||||
fi
|
fi
|
||||||
;;
|
else
|
||||||
*)
|
|
||||||
if checkyesno mountd_enable; then
|
if checkyesno mountd_enable; then
|
||||||
checkyesno weak_mountd_authentication && mountd_flags="-n"
|
checkyesno weak_mountd_authentication && mountd_flags="-n"
|
||||||
fi
|
fi
|
||||||
esac
|
fi
|
||||||
rm -f /var/db/mountdtab
|
rm -f /var/db/mountdtab
|
||||||
( umask 022 ; > /var/db/mountdtab )
|
( umask 022 ; > /var/db/mountdtab )
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user