Commit 01d470f6 authored by Leigh Stoller's avatar Leigh Stoller

Minor tweak to make it easier to allocate a single node.

parent 4210d41d
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# Copyright (c) 2000-2008 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -20,8 +20,8 @@ my $d = 0; #debug mode
if ($#ARGV >= 0 && $ARGV[0] =~ /^-?h/i ) {
die("Usage:\navail [help] [type[=<type>]] [OS[=<OS>]] [ver[=<OS_ver>]]\n".
" [[includevirt] or [virtonly[=<phys>]]] [rand] [limit=N]".
"\n".
" [[includevirt] or [virtonly[=<phys>]]] [rand]\n".
" [limit=N] [aslist]\n".
"\n".
"type \t= pc | shark\n"."OS \t= Linux | FreeBSD | NetBSD | ...\n".
"ver \t= 6.2 | 3.4 | 4.0 | 5.2 | ...\n".#"deltas \t= anetd | ...\n".
......@@ -129,7 +129,14 @@ print "Sending cmd:\n$cmd\n" if $d;
my $result = DBQueryFatal($cmd);
print $result->as_string();
if ($args{"aslist"}) {
while (my ($node_id) = $result->fetchrow_array()) {
print "$node_id\n";
}
}
else {
print $result->as_string();
}
# Hacky. Batch daemon depends on this exit code.
exit($result->numrows);
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