]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-scripts: Fix tcp_tw_recycle existence check
authorRafael David Tinoco via samba-technical <samba-technical@lists.samba.org>
Mon, 3 Jun 2019 02:44:15 +0000 (23:44 -0300)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 4 Jun 2019 23:31:24 +0000 (23:31 +0000)
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 <rafaeldtinoco@ubuntu.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jun  4 23:31:24 UTC 2019 on sn-devel-184

ctdb/config/nfs-linux-kernel-callout

index def69a04649aa27877f953ae30b580f05db47e3d..71d8ecf80740783f204a5b6abd17cedf926a0ab3 100755 (executable)
@@ -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
 }