diff options
author | Ronnie Sahlberg <sahlberg@ronnie> | 2007-08-15 15:01:31 +1000 |
---|---|---|
committer | Ronnie Sahlberg <sahlberg@ronnie> | 2007-08-15 15:01:31 +1000 |
commit | 3b9d50f3eeb3086abf065a8abff1b7519b42f057 (patch) | |
tree | be7bb39a6ed7990cc9b1b5f13777b0a0a0424f09 /ctdb/server/eventscript.c | |
parent | ff58f7c7ea130e12a9347c06b5e7fe7c4747726f (diff) | |
download | samba-3b9d50f3eeb3086abf065a8abff1b7519b42f057.tar.gz samba-3b9d50f3eeb3086abf065a8abff1b7519b42f057.tar.xz samba-3b9d50f3eeb3086abf065a8abff1b7519b42f057.zip |
change the now rather small /etc/ctdb/events script into a service
specific script /etc/ctdb/events.d/00.ctdb
get rid of CTDB_EVENTS_SCRIPT and --event-script
(This used to be ctdb commit 81ccfaf838e5772d4a58eb6a70224b7b39aba9f3)
Diffstat (limited to 'ctdb/server/eventscript.c')
-rw-r--r-- | ctdb/server/eventscript.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c index 2cd2e66f34..6c661d7cc6 100644 --- a/ctdb/server/eventscript.c +++ b/ctdb/server/eventscript.c @@ -43,41 +43,6 @@ static int ctdb_event_script_v(struct ctdb_context *ctdb, const char *fmt, va_li struct dirent *de; char *script; - /* - run the main event script - */ - if (stat(ctdb->takeover.main_event_script, &st) != 0 && - errno == ENOENT) { - DEBUG(0,("No event script found at '%s'\n", ctdb->takeover.main_event_script)); - talloc_free(tmp_ctx); - return 0; - } - - va_copy(ap2, ap); - options = talloc_vasprintf(tmp_ctx, fmt, ap2); - va_end(ap2); - CTDB_NO_MEMORY(ctdb, options); - - cmdstr = talloc_asprintf(tmp_ctx, "%s %s", - ctdb->takeover.main_event_script, options); - CTDB_NO_MEMORY(ctdb, cmdstr); - - - ret = system(cmdstr); - /* if the system() call was successful, translate ret into the - return code from the command - */ - if (ret != -1) { - ret = WEXITSTATUS(ret); - } - /* return an error if the script failed */ - if (ret != 0) { - talloc_free(tmp_ctx); - return ret; - } - - - /* the service specific event scripts */ |