mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
add a ctdb command to print the ctdb version
(This used to be ctdb commit 401fb01f8cb06886e2c5c277a9a70512a9b68579)
This commit is contained in:
parent
d6736b3720
commit
416409d31b
@ -39,7 +39,7 @@ CC="gcc"
|
||||
## always run autogen.sh
|
||||
./autogen.sh
|
||||
|
||||
CFLAGS="$RPM_OPT_FLAGS $EXTRA -O0 -D_GNU_SOURCE" ./configure \
|
||||
CFLAGS="$RPM_OPT_FLAGS $EXTRA -O0 -D_GNU_SOURCE -DCTDB_VERS=\"%{version}-%{release}\"" ./configure \
|
||||
--prefix=%{_prefix} \
|
||||
--sysconfdir=%{_sysconfdir} \
|
||||
--mandir=%{_mandir} \
|
||||
|
@ -40,6 +40,16 @@ static struct {
|
||||
|
||||
#define TIMELIMIT() timeval_current_ofs(options.timelimit, 0)
|
||||
|
||||
#ifdef CTDB_VERS
|
||||
static int control_version(struct ctdb_context *ctdb, int argc, const char **argv)
|
||||
{
|
||||
#define STR(x) #x
|
||||
#define XSTR(x) STR(x)
|
||||
printf("CTDB version: %s\n", XSTR(CTDB_VERS));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
see if a process exists
|
||||
*/
|
||||
@ -1561,6 +1571,9 @@ static const struct {
|
||||
const char *msg;
|
||||
const char *args;
|
||||
} ctdb_commands[] = {
|
||||
#ifdef CTDB_VERS
|
||||
{ "version", control_version, true, "show version of ctdb" },
|
||||
#endif
|
||||
{ "status", control_status, true, "show node status" },
|
||||
{ "uptime", control_uptime, true, "show node uptime" },
|
||||
{ "ping", control_ping, true, "ping all nodes" },
|
||||
|
Loading…
x
Reference in New Issue
Block a user