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)
commit3400b2ed34b6eb9496eb55f1aab6f89d2952060d
tree2618a6c78a4fa02641afcbcde243e827e13bdbe3
parent0581f9a84e58764d194f4e04064c2c5b393c348b
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>
server/eventscript.c