Commit 71640274 authored by Leigh Stoller's avatar Leigh Stoller

Add sendevent perl wrapper, which invokes the Testbed Master Event

Client from rc.setup. Send the ISUP event when testbed configuration
is complete.
parent 52b499d4
......@@ -40,6 +40,7 @@ script-install: dir-install
$(INSTALL) -m 644 $(SRCDIR)/group $(INSTALL_DIR)/group
$(INSTALL) -m 600 $(SRCDIR)/master.passwd $(INSTALL_DIR)/master.passwd
$(INSTALL) -m 755 $(SRCDIR)/prepare $(INSTALL_DIR)/prepare
$(INSTALL) -m 755 $(SRCDIR)/sendevent $(INSTALL_DIR)/sendevent
$(INSTALL) -m 755 $(SRCDIR)/../libsetup.pm $(INSTALL_DIR)/libsetup.pm
$(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm \
$(INSTALL_DIR)/liblocsetup.pm
......
......@@ -35,3 +35,10 @@ if [ -s /etc/testbed/startupcmd ]; then
echo "/etc/testbed/runstartup" | at -q S 'now + 2 minutes'
fi
#
# Generate an event that says we are up and running
#
if [ -x /etc/testbed/sendevent ]; then
echo "Sending an ISUP event ..."
/etc/testbed/sendevent ISUP
fi
#!/usr/bin/perl -w
use English;
#
# Send a Testbed Control event.
#
# usage: sendevent <event>
#
#
# Untaint path
#
$ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/local/bin:/etc/testbed';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
#
# Load the OS independent support library. It will load the OS dependent
# library and initialize itself.
#
use lib "/etc/testbed";
use libsetup;
#
# We use the tmcc to figure out where the Testbed Event Daemon is running.
# Don't worry about the port for now.
#
my ($bossname) = split(" ", `tmcc bossinfo`);
unshift(@ARGV, ("-s", "$bossname"));
exec "tbmevc", @ARGV;
die("Could not exec tbevc: $!");
......@@ -51,6 +51,7 @@ script-install: dir-install
$(INSTALL) -m 755 $(SRCDIR)/rc.delta $(INSTALL_DIR)/rc.delta
$(INSTALL) -m 755 $(SRCDIR)/runstartup $(INSTALL_DIR)/runstartup
$(INSTALL) -m 755 $(SRCDIR)/prepare $(INSTALL_DIR)/prepare
$(INSTALL) -m 755 $(SRCDIR)/sendevent $(INSTALL_DIR)/sendevent
$(INSTALL) -m 755 $(SRCDIR)/setup $(INSTALL_DIR)/setup
$(INSTALL) -m 755 $(SRCDIR)/update $(INSTALL_DIR)/update
$(INSTALL) -m 755 $(SRCDIR)/sethostname $(INSTALL_DIR)/sethostname
......
......@@ -30,3 +30,11 @@ if [ -s /etc/rc.d/testbed/startupcmd ]; then
echo "Scheduling startup command to run in a little bit ..."
echo "/etc/rc.d/testbed/runstartup" | at -q S 'now + 2 minutes'
fi
#
# Generate an event that says we are up and running
#
if [ -x /etc/rc.d/testbed/sendevent ]; then
echo "Sending an ISUP event ..."
/etc/rc.d/testbed/sendevent ISUP
fi
#!/usr/bin/perl -w
use English;
#
# Send a Testbed Control event.
#
# usage: sendevent <event>
#
#
# Untaint path
#
$ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/local/bin:/etc/rc.d/testbed';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
#
# Load the OS independent support library. It will load the OS dependent
# library and initialize itself.
#
use lib "/etc/rc.d/testbed";
use libsetup;
#
# We use the tmcc to figure out where the Testbed Event Daemon is running.
# Don't worry about the port for now.
#
my ($bossname) = split(" ", `tmcc bossinfo`);
unshift(@ARGV, ("-s", "$bossname"));
exec "tbmevc", @ARGV;
die("Could not exec tbevc: $!");
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