[PATCH] ctdb-scripts: Fix tcp_tw_recycle existence check
jim
jim.brown at rsmas.miami.edu
Mon Jun 3 02:56:16 UTC 2019
Make the test explicit for non-empty PROCFS_PATH:
if [ "${PROCFS_PATH}" && -f "$_f" ] ; then
On 6/2/2019 10:44 PM, Rafael David Tinoco via samba-technical wrote:
> net.ipv4.tcp_tw_recycle has been removed from Linux 4.12 but, still,
> makes sense to check its existence. Unfortunately, current check does
> not test for the procfs file existence. This commit fixes the issue.
>
> Signed-off-by: Rafael David Tinoco <rafaeldtinoco at ubuntu.com>
> ---
> ctdb/config/nfs-linux-kernel-callout | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ctdb/config/nfs-linux-kernel-callout b/ctdb/config/nfs-linux-kernel-callout
> index def69a04649..71d8ecf8074 100755
> --- a/ctdb/config/nfs-linux-kernel-callout
> +++ b/ctdb/config/nfs-linux-kernel-callout
> @@ -281,8 +281,8 @@ nfs_startup ()
> basic_stop "nfs" || true
> basic_start "nfs"
> _f="${PROCFS_PATH}/sys/net/ipv4/tcp_tw_recycle"
> - if [ "$_f" ] ; then
> - echo 1 >"$_f"
> + if [ -f "$_f" ] ; then
> + echo 1 >"$_f"
> fi
> }
>
More information about the samba-technical
mailing list