Commit 8e15134b authored by Mac Newbold's avatar Mac Newbold

Make sure they specify at least one of -d, -b, or -l, so we don't get that...

Make sure they specify at least one of -d, -b, or -l, so we don't get that stupid db error from the missing query parts!
parent cf06dafd
......@@ -10,6 +10,7 @@ sub usage()
print STDERR
"Usage: delay_config [-d delay] [-b bw] [-l plr] [-p 0|1] ",
"<pid> <eid> <link>\n",
"Required: pid, eid, link, and at least one of -d, -b, or -l\n",
" pid = Project ID\n",
" eid = Experiment ID\n",
" link = link name from ns file, ie. 'link1' in\n",
......@@ -52,6 +53,9 @@ delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
# Parse command arguments. Once we return from getopts, all that should be
# left are the required arguments.
#
if (@ARGV < 4) {
usage();
}
%options = ();
if (! getopts($optlist, \%options)) {
usage();
......
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