Low: CTDB: Use 'chmod' instead of 'ctdb enablescript' (bnc#697152)
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 <179776560e3cc6916f9eda0b631970b6e8e82669@novell.com>

asp24/resource-agents,stevenraspudic/resource-agents,asp24/resource-agents,asp24/resource-agents,stevenraspudic/resource-agents,stevenraspudic/resource-agents