ctdbd: Complain loudly if CTDB_DEBUG_HUNG_SCRIPT script isn't executable
authorMartin Schwenke <martin@meltin.net>
Tue, 5 Feb 2013 03:25:01 +0000 (14:25 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Tue, 5 Feb 2013 05:05:13 +0000 (16:05 +1100)
commite8837204610b42ef2c0c38cd880524ec92dee4e9
tree526bffed82d0464ac72348f62482c88b5a584257
parentbc5f0a2b651109d1f271d167f8d233763ec4f4a9
ctdbd: Complain loudly if CTDB_DEBUG_HUNG_SCRIPT script isn't executable

This is quite easy to misconfigure by failing to set the execute bit
on the script.  Better to complain loudly.

This is a debugging facilty rather than core CTDB functionality, so it
doesn't need a subtle mechanism to disable it at run-time.  To disable
the designated script at run-time either edit it to put an "exit 0" at
the top or move it aside and symlink to /bin/true.

This is implemented by actually removing the code that checks that the
file exists and is executable.  The output from the shell when the
system() function fails is just as useful.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3400b2ed34b6eb9496eb55f1aab6f89d2952060d)
ctdb/server/eventscript.c