All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit f97801ae authored by David Johnson's avatar David Johnson

ifdef out emulab-specific stuff on request

parent 319eba0a
......@@ -11,8 +11,10 @@
#include <errno.h>
#include <string.h>
#include <unistd.h>
#ifndef NO_EMULAB
#include <mysql/mysql.h>
#include "tbdb.h"
extern char *optarg;
extern int optopt;
......@@ -54,9 +56,10 @@ void usage(char *prog) {
" -d Turn on debugging (more d's mean more debug info)\n"
" -s Use secure RMCP\n"
" -H Interpret keys as hex strings instead of char strings\n"
#ifndef NO_EMULAB
" -E Resolve client and keys using the Emulab database\n"
" (this option implies -H)\n"
" -c host The hostname of the managed client\n"
" -t timeout Timeout (in seconds) for individual RMCP messages\n"
" (default: %d)\n"
" -m retries Retry N times for unacknowledged RMCP sends\n"
......@@ -67,7 +70,10 @@ void usage(char *prog) {
" -g key Use this generation key\n"
" -u uid Send the specified username\n"
" clientname IP or hostname (or Emulab node_id if -E specified)\n"
" clientname IP or hostname\n"
#ifndef NO_EMULAB
" (or Emulab node_id if -E specified)\n"
" command This argument performs an operation on the managed\n"
" client. The available commands are:\n",
......@@ -105,9 +111,11 @@ int main(int argc,char **argv) {
char *command = NULL;
int emulab = 0;
char emip[16];
#ifndef NO_EMULAB
int nrows;
char *src;
int clen;
......@@ -193,6 +201,7 @@ int main(int argc,char **argv) {
ctx = rmcp_ctx_init(timeout,retries);
#ifndef NO_EMULAB
if (emulab) {
/* Attempt lookup in Emulab db */
......@@ -275,6 +284,7 @@ int main(int argc,char **argv) {
client = emip;
if (secure) {
if (strcmp(role,"administrator") == 0) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment