Low: CTDB: Use 'chmod' instead of 'ctdb enablescript' (bnc#697152)
The CTDB resource agent currently goes through the following process in
ctdb_start():
- execute /usr/sbin/ctdbd to start the ctdb daemon
- await completion of recovery by monitoring "ctdb status" output
- run disable_event_scripts() on successful completion of recovery
- run "ctdb enablescript 50.samba" if CTDB_MANAGES_SAMBA=yes was configured
- disable other scripts with "ctdb disablescript <script>"
The problem is that by the time "ctdb enablescript 50.samba" is run,
ctdbd has already completed recovery and triggered the "startup" event
for all event scripts, therefore only monitoring is performed.
This change ensures the relevant scripts are enabled/disabled prior to
ctdbd starting.
Signed-off-by: Tim Serong <tserong@novell.com>