mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
ctdb-tool: Exit with 1 on failure instead of -1
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
02709c7aaa
commit
fc7968dbea
@ -12,7 +12,7 @@ EOF
|
||||
|
||||
rm -f "$CTDB_NODES"
|
||||
|
||||
required_result 255 <<EOF
|
||||
required_result 1 <<EOF
|
||||
${TEST_DATE_STAMP}Failed to read nodes file "${CTDB_NODES}"
|
||||
EOF
|
||||
|
||||
|
@ -23,7 +23,7 @@ NODEMAP
|
||||
2 192.168.20.43 0x0
|
||||
EOF
|
||||
|
||||
required_result 255 <<EOF
|
||||
required_result 1 <<EOF
|
||||
ERROR: Node file on node 1 differs from current node (0)
|
||||
EOF
|
||||
|
||||
|
@ -25,7 +25,7 @@ NODEMAP
|
||||
2 192.168.20.43 0x0
|
||||
EOF
|
||||
|
||||
required_result 255 <<EOF
|
||||
required_result 1 <<EOF
|
||||
ctdb_control error: 'Failed to read nodes file'
|
||||
ctdb_control error: 'Failed to read nodes file'
|
||||
ERROR: Failed to get nodes file from node 1
|
||||
|
@ -5886,7 +5886,11 @@ int main(int argc, const char *argv[])
|
||||
DEBUG(DEBUG_ERR, ("Can't specify node(s) with \"ctdb %s\"\n", control));
|
||||
exit(1);
|
||||
}
|
||||
return ctdb_commands[i].fn(NULL, extra_argc-1, extra_argv+1);
|
||||
ret = ctdb_commands[i].fn(NULL, extra_argc-1, extra_argv+1);
|
||||
if (ret == -1) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* initialise ctdb */
|
||||
@ -5932,6 +5936,8 @@ int main(int argc, const char *argv[])
|
||||
talloc_free(ev);
|
||||
(void)poptFreeContext(pc);
|
||||
|
||||
if (ret == -1) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user