From: Rafael David Tinoco via samba-technical Date: Mon, 3 Jun 2019 02:44:15 +0000 (-0300) Subject: ctdb-scripts: Fix tcp_tw_recycle existence check X-Git-Tag: samba-4.9.10~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44b5168845e9be83e47b1ebe7cc75b849d12fad6;p=thirdparty%2Fsamba.git ctdb-scripts: Fix tcp_tw_recycle existence check 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. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13984 Signed-off-by: Rafael David Tinoco Reviewed-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jun 4 23:31:24 UTC 2019 on sn-devel-184 (cherry picked from commit 843fbb1207ee7ac84f3282974b66b9290d8da0ac) --- diff --git a/ctdb/config/nfs-linux-kernel-callout b/ctdb/config/nfs-linux-kernel-callout index 3d1dc63c590..12ed17c6d9e 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 }