Commit b15dab7f authored by Mike Hibler's avatar Mike Hibler

Add -E option to never send BOOTING/PXEBOOTING events.

Use on Cloudlab Utah where we configure dhcpd to send the events
(needed for the uboot'ed ARM cartridges).
parent 28ab9f2e
/*
* Copyright (c) 2000-2014 University of Utah and the Flux Group.
* Copyright (c) 2000-2016 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -51,6 +51,7 @@ static void log_bootwhat(struct in_addr, boot_what_t *, int);
static void onhup(int sig);
static char *progname;
static char pidfile[MAXPATHLEN];
int noevents = 0;
int debug = 0;
void
......@@ -59,6 +60,7 @@ usage()
fprintf(stderr,
"Usage: %s <options> [-d]\n"
"options:\n"
"-E - Do not send BOOTING events\n"
"-d - Turn on debugging\n"
"-p port - Specify port number to listen on\n",
progname);
......@@ -85,8 +87,11 @@ main(int argc, char **argv)
progname = argv[0];
while ((c = getopt(argc, argv, "p:dhv")) != -1) {
while ((c = getopt(argc, argv, "Ep:dhv")) != -1) {
switch (c) {
case 'E':
noevents = 1;
break;
case 'd':
debug++;
break;
......@@ -168,7 +173,7 @@ main(int argc, char **argv)
exit(1);
}
err = bootinfo(client.sin_addr, (char *) NULL,
&boot_info, (void *) NULL, 0, &esent);
&boot_info, (void *) NULL, noevents, &esent);
if (err < 0)
continue;
if (boot_info.status == BISTAT_SUCCESS)
......
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