Commit bd7de76d authored by Leigh Stoller's avatar Leigh Stoller

Wrap up portstats to use the proper version.

parent 789a5c17
...@@ -28,7 +28,7 @@ BIN_STUFF = power snmpit tbend tbprerun tbreport \ ...@@ -28,7 +28,7 @@ BIN_STUFF = power snmpit tbend tbprerun tbreport \
node_reboot nscheck node_update savelogs node_control \ node_reboot nscheck node_update savelogs node_control \
checkports eventsys_control os_select tbrestart \ checkports eventsys_control os_select tbrestart \
tbswap nseswap tarfiles_setup node_history tbrsync \ tbswap nseswap tarfiles_setup node_history tbrsync \
pxe_select \ pxe_select portstats \
archive_control template_create \ archive_control template_create \
template_swapin template_swapout template_graph \ template_swapin template_swapout template_graph \
template_exprun template_delete template_metadata \ template_exprun template_delete template_metadata \
......
#!/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) ||
EmulabFeatures->FeatureEnabled("OldSnmpit",
$this_user, undef, undef)) {
my $newpath = "$TB/lib/snmpit_old/portstats";
print STDERR "Invoking alternate portstats from $newpath\n";
exec $newpath, @ARGV;
die("*** $0:\n".
" Could not exec $newpath: $!");
}
my $newpath = "$TB/lib/snmpit_test/portstats";
exec $newpath, @ARGV;
die("*** $0:\n".
" Could not exec $newpath: $!");
...@@ -16,7 +16,7 @@ include $(OBJDIR)/Makeconf ...@@ -16,7 +16,7 @@ include $(OBJDIR)/Makeconf
SUBDIRS = SUBDIRS =
BIN_STUFF = snmpit_old snmpit_ancient BIN_STUFF = snmpit_old snmpit_ancient
LIB_STUFF = snmpit_intel.pm \ LIB_STUFF = portstats snmpit_intel.pm \
snmpit_cisco.pm snmpit_lib.pm \ snmpit_cisco.pm snmpit_lib.pm \
snmpit_cisco_stack.pm snmpit_intel_stack.pm \ snmpit_cisco_stack.pm snmpit_intel_stack.pm \
snmpit_foundry.pm snmpit_stack.pm snmpit_remote.pm \ snmpit_foundry.pm snmpit_stack.pm snmpit_remote.pm \
...@@ -49,3 +49,8 @@ $(INSTALL_DIR)/lib/snmpit_old/%: % ...@@ -49,3 +49,8 @@ $(INSTALL_DIR)/lib/snmpit_old/%: %
@echo "Installing $<" @echo "Installing $<"
-mkdir -p $(INSTALL_DIR)/lib/snmpit_old -mkdir -p $(INSTALL_DIR)/lib/snmpit_old
$(INSTALL) $< $@ $(INSTALL) $< $@
$(INSTALL_DIR)/lib/snmpit_old/portstats: portstats
@echo "Installing $<"
-mkdir -p $(INSTALL_DIR)/lib/snmpit_old
$(INSTALL_PROGRAM) $< $@
...@@ -16,7 +16,7 @@ include $(OBJDIR)/Makeconf ...@@ -16,7 +16,7 @@ include $(OBJDIR)/Makeconf
SUBDIRS = SUBDIRS =
BIN_STUFF = snmpit_test BIN_STUFF = snmpit_test
LIB_STUFF = snmpit_intel.pm \ LIB_STUFF = portstats snmpit_intel.pm \
snmpit_cisco.pm snmpit_lib.pm \ snmpit_cisco.pm snmpit_lib.pm \
snmpit_cisco_stack.pm snmpit_intel_stack.pm \ snmpit_cisco_stack.pm snmpit_intel_stack.pm \
snmpit_foundry.pm snmpit_stack.pm snmpit_remote.pm \ snmpit_foundry.pm snmpit_stack.pm snmpit_remote.pm \
...@@ -50,3 +50,8 @@ $(INSTALL_DIR)/lib/snmpit_test/%: % ...@@ -50,3 +50,8 @@ $(INSTALL_DIR)/lib/snmpit_test/%: %
@echo "Installing $<" @echo "Installing $<"
-mkdir -p $(INSTALL_DIR)/lib/snmpit_test -mkdir -p $(INSTALL_DIR)/lib/snmpit_test
$(INSTALL) $< $@ $(INSTALL) $< $@
$(INSTALL_DIR)/lib/snmpit_test/portstats: portstats
@echo "Installing $<"
-mkdir -p $(INSTALL_DIR)/lib/snmpit_test
$(INSTALL_PROGRAM) $< $@
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