[PATCH] ctdb-scripts: Fix tcp_tw_recycle existence check
Rafael David Tinoco
rafaeldtinoco at ubuntu.com
Mon Jun 3 02:44:15 UTC 2019
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
}
--
2.20.1
More information about the samba-technical
mailing list