Commit ab6c757a authored by Leigh Stoller's avatar Leigh Stoller

Finalize making snmpit_test the defaul. snmpit is now just a simple

wrapper.
parent 233c07c8
......@@ -23,7 +23,7 @@ ifeq ($(NSVERIFY),1)
SUBDIRS += nsverify
endif
BIN_STUFF = power tbend tbprerun tbreport \
BIN_STUFF = power snmpit tbend tbprerun tbreport \
os_load endexp batchexp swapexp \
node_reboot nscheck node_update savelogs node_control \
checkports eventsys_control os_select tbrestart \
......
#!/usr/bin/perl -w
#
# EMULAB-LGPL
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# All rights reserved.
#
# This now a frontend to run the proper version.
#
use English;
use Getopt::Long;
use strict;
#
# Configure variables
#
my $TB = '@prefix@';
# This is all we need for a front end.
use lib '@prefix@/lib';
use User;
use libtestbed;
use EmulabFeatures;
#
# See if we use the alternate version of snmpit. Only user and
# global checks are done.
#
my $this_user;
if ($UID) {
$this_user = User->ThisUser();
if (! defined($this_user)) {
die("*** $0:\n".
" You ($UID) do not exist!\n");
}
}
# Lets not bother (or worry) people.
$EmulabFeatures::verbose = 0;
if (EmulabFeatures->FeatureEnabled("AncientSnmpit",
$this_user, undef, undef)) {
my $newpath = "$TB/bin/snmpit_ancient";
print STDERR "Invoking alternate snmpit from $newpath\n";
exec $newpath, @ARGV;
die("*** $0:\n".
" Could not exec $newpath: $!");
}
if (EmulabFeatures->FeatureEnabled("OldSnmpit", $this_user, undef, undef)) {
my $newpath = "$TB/bin/snmpit_old";
print STDERR "Invoking alternate snmpit from $newpath\n";
exec $newpath, @ARGV;
die("*** $0:\n".
" Could not exec $newpath: $!");
}
my $newpath = "$TB/bin/snmpit_test";
exec $newpath, @ARGV;
die("*** $0:\n".
" Could not exec $newpath: $!");
#!/usr/bin/perl -w
#
# EMULAB-LGPL
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -518,26 +518,6 @@ if ($pid && $eid) {
die "You do not have permission to modify experiment $pid/$eid\n";
}
}
#
# See if we use the alternate version of snmpit from Rob.
#
if ($MAINSITE && $TB eq "/usr/testbed" && !$opt{Z}) {
my $group = (defined($experiment) ? $experiment->GetGroup() : undef);
$EmulabFeatures::verbose = 0;
my $newsnmpit =
(EmulabFeatures->FeatureEnabled("RobSnmpit",
$this_user, $group, $experiment));
if ($newsnmpit) {
# Rob, change this path:
my $newpath = "$TB/bin/snmpit";
print STDERR "Invoking alternate snmpit from $newpath\n";
unshift(@SAVEARGV, "-Z");
exec $newpath, @SAVEARGV;
die("*** $0:\n".
" Could not exec $newpath: $!");
}
}
if (!@commands) {
tbreport(SEV_ERROR, 'no_operation');
......
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