Commit c3fac28c authored by Leigh Stoller's avatar Leigh Stoller

Switch to autogen of webxxx scripts.

parent 808f43ec
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -16,15 +16,18 @@ SUBDIRS = nsgen
BIN_SCRIPTS = delay_config sshtb create_image node_admin link_config \
setdest loghole webcopy linkmon_ctl snmp-if-deref.sh \
template_record
template_record spewevents
SBIN_SCRIPTS = vlandiff vlansync withadminprivs export_tables cvsupd.pl \
eventping grantnodetype import_commitlog daemon_wrapper \
opsreboot deletenode node_statewait grabwebcams \
grabswitchconfig backupswitches cvsinit checkquota \
spewconlog opsdb_control
LIBEXEC_SCRIPTS = webcreateimage newnode webdeletenode spewleds webcopy \
websetdest spewsource weblinkmon_ctl webcvsweb \
webspewconlog xlogin webviewvc spewevents
spewconlog opsdb_control newnode
WEB_SBIN_SCRIPTS= webnewnode webdeletenode webspewconlog
WEB_BIN_SCRIPTS = webcreate_image websetdest weblinkmon_ctl webspewevents
LIBEXEC_SCRIPTS = spewleds webcopy spewsource webcvsweb xlogin webviewvc \
$(WEB_BIN_SCRIPTS) $(WEB_SBIN_SCRIPTS)
CTRLSBIN_SCRIPTS= opsdb_control.proxy daemon_wrapper
# These scripts installed setuid, with sudo.
......@@ -75,6 +78,18 @@ post-install:
#
control-install:
# This rule says what web* script depends on which installed binary directory.
$(WEB_SBIN_SCRIPTS): $(INSTALL_SBINDIR)
$(WEB_BIN_SCRIPTS): $(INSTALL_BINDIR)
# Just in case the dirs are not yet created,
$(INSTALL_SBINDIR) $(INSTALL_BINDIR):
# And then how to turn the template into the actual script.
$(WEB_SBIN_SCRIPTS) $(WEB_BIN_SCRIPTS): $(TESTBED_SRCDIR)/WEBtemplate.in
@echo "Generating $@"
cat $< | sed -e 's,@PROGTOINVOKE@,$(word 2,$^)/$(subst web,,$@),' > $@
#
# Automate this part at some point.
#
......
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
#
# This gets invoked from the Web interface. Simply a wrapper ...
#
#
# Configure variables
#
my $TB = "@prefix@";
#
# Run the real thing, and never return.
#
exec "$TB/bin/create_image", @ARGV;
die("webcreateimage: Could not exec create_image: $!");
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
#
# This gets invoked from the Web interface. Simply a wrapper ...
#
#
# Configure variables
#
my $TB = "@prefix@";
#
# Run the real thing, and never return.
#
exec "$TB/sbin/deletenode", @ARGV;
die("webdeletenode: Could not exec deletenode: $!");
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
#
# This gets invoked from the Web interface. Simply a wrapper ...
#
#
# Configure variables
#
my $TB = "@prefix@";
#
# Run the real thing, and never return.
#
exec "$TB/bin/linkmon_ctl", @ARGV;
die("weblinkmon_ctl: Could not exec linkmon_ctl: $!");
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004, 2005 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
#
# This gets invoked from the Web interface. Simply a wrapper ...
#
#
# Configure variables
#
my $TB = "@prefix@";
#
# Run the real thing, and never return.
#
exec "$TB/bin/setdest", @ARGV;
die("websetdest: Could not exec setdest: $!");
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2005 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
#
# This gets invoked from the Web interface. Simply a wrapper ...
#
#
# Configure variables
#
my $TB = "@prefix@";
#
# Run the real thing, and never return.
#
exec "$TB/sbin/spewconlog", @ARGV;
die("webspewconlog: Could not exec spewconlog: $!");
......@@ -123,7 +123,7 @@ flush();
SUEXEC($uid,
"$image_pid,$unix_gid" . ($image_pid != $node_pid ? ",$node_pid" : ""),
"webcreateimage -p $image_pid $image_name $node",
"webcreate_image -p $image_pid $image_name $node",
SUEXEC_ACTION_DUPDIE);
echo "This will take 10 minutes or more; you will receive email
......
......@@ -900,7 +900,7 @@ if (isset($node)) {
<br><br>\n";
flush();
SUEXEC($uid, "$pid,$unix_gid", "webcreateimage -p $pid $imagename $node",
SUEXEC($uid, "$pid,$unix_gid", "webcreate_image -p $pid $imagename $node",
SUEXEC_ACTION_DUPDIE);
echo "This will take 10 minutes or more; you will receive email
......
......@@ -1251,7 +1251,7 @@ if (isset($node)) {
<br><br>\n";
flush();
SUEXEC($uid, "$pid,$unix_gid", "webcreateimage -p $pid $imagename $node",
SUEXEC($uid, "$pid,$unix_gid", "webcreate_image -p $pid $imagename $node",
SUEXEC_ACTION_DUPDIE);
echo "This will take 10 minutes or more; you will receive email
......
<?PHP
#
# EMULAB-COPYRIGHT
# Copyright (c) 2003, 2005, 2006 University of Utah and the Flux Group.
# Copyright (c) 2003, 2005, 2006, 2007 University of Utah and the Flux Group.
# All rights reserved.
#
require("defs.php3");
......@@ -108,7 +108,7 @@ if ($create) {
echo "<h3>Creating nodes - this could take a while, please wait</h3>\n";
echo "<hr>\n";
echo "<pre>\n";
passthru("$TBSUEXEC_PATH $uid $gid newnode $nodelist 2>&1");
passthru("$TBSUEXEC_PATH $uid $gid webnewnode $nodelist 2>&1");
echo "</pre>\n";
echo "<hr>\n";
}
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2006 University of Utah and the Flux Group.
# Copyright (c) 2006, 2007 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -58,7 +58,7 @@ function SPEWCLEANUP()
}
register_shutdown_function("SPEWCLEANUP");
if ($fp = popen("$TBSUEXEC_PATH $uid $pid spewevents -w $pid $eid", "r")) {
if ($fp = popen("$TBSUEXEC_PATH $uid $pid webspewevents -w $pid $eid", "r")) {
header("Content-Type: text/plain");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
......
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