While 0 may indicate that all threads have exited after being stuck,
it may also indicate that nfsd should not be running due to being shut
down.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13860
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sun Mar 31 11:47:44 UTC 2019 on sn-devel-144
# Intentionally not arithmetic comparison - avoids extra errors
# when above read fails in an unexpected way...
- if [ "$_running_threads" != "$_configured_threads" ] ; then
- echo "Attempting to correct number of nfsd threads from ${_running_threads} to ${_configured_threads}"
+ if [ "$_running_threads" != "0" ] && \
+ [ "$_running_threads" != "$_configured_threads" ] ; then
+ printf 'Attempting to correct number of nfsd threads from %s to %s\n' \
+ "$_running_threads" "$_configured_threads"
echo "$_configured_threads" >"$_threads_file"
fi
}