Commit 1401ce90 authored by Leigh Stoller's avatar Leigh Stoller

Remove obsolote stuff from the (lengthy) usage message.

Add a limit=N option for controlling how many nodes returned.
parent aa43c008
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -20,15 +20,14 @@ 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]\n".
#" [deltas=<delta[,delta,...]>]".
# " [fixes=<fix_name[,fix_name,...]>]".
" [[includevirt] or [virtonly[=<phys>]]] [rand] [limit=N]".
"\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".
"includevirt: Include virtual nodes\n".
"rand: Randomize result order\n".
# "fixes \t\t= cron_off | sendmail_off | ...\n"
"limit: Limit count to N nodes\n".
"A field name alone will show that field in the display of available\n".
"nodes. A field name with '=' followed by a string will match nodes\n".
"that have that string in that field.\n"
......@@ -82,6 +81,12 @@ if ($args{"rand"}) {
$order = "priority";
}
if ($args{"limit"}) {
$limit = "limit " . $args{"limit"};
} else {
$limit = "";
}
my $os = 0;
my $delta = 0;
......@@ -118,7 +123,7 @@ if ($os) {
# }
my $cmd = "select $cols from $join where $cond order by $order";
my $cmd = "select $cols from $join where $cond order by $order $limit";
print "Sending cmd:\n$cmd\n" if $d;
......
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