Commit c02dc6a3 authored by Robert Ricci's avatar Robert Ricci
Browse files

Have wideareakeys.php3 call deletenode instead of trying to delete

nodes itself.
parent dbf96a2a
......@@ -1488,7 +1488,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
utils/cvsupd.pl utils/newnode utils/grantnodetype \
utils/nsgen/GNUmakefile utils/nsgen/webnsgen \
utils/link_config utils/import_commitlog utils/dhcpd_wrapper \
utils/opsreboot utils/deletenode \
utils/opsreboot utils/deletenode utils/webdeletenode \
www/GNUmakefile www/defs.php3 www/dbdefs.php3 \
www/swish.conf www/websearch \
vis/GNUmakefile vis/webvistopology vis/dbvistopology \
......
......@@ -527,7 +527,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
utils/cvsupd.pl utils/newnode utils/grantnodetype \
utils/nsgen/GNUmakefile utils/nsgen/webnsgen \
utils/link_config utils/import_commitlog utils/dhcpd_wrapper \
utils/opsreboot utils/deletenode \
utils/opsreboot utils/deletenode utils/webdeletenode \
www/GNUmakefile www/defs.php3 www/dbdefs.php3 \
www/swish.conf www/websearch \
vis/GNUmakefile vis/webvistopology vis/dbvistopology \
......
......@@ -18,7 +18,7 @@ BIN_SCRIPTS = delay_config sshtb create_image node_admin link_config
SBIN_SCRIPTS = vlandiff vlansync withadminprivs export_tables cvsupd.pl \
eventping grantnodetype import_commitlog dhcpd_wrapper \
opsreboot deletenode
LIBEXEC_SCRIPTS = webcreateimage newnode
LIBEXEC_SCRIPTS = webcreateimage newnode webdeletenode
#
# Force dependencies on the scripts so that they will be rerun through
......
#!/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: $!");
......@@ -95,15 +95,8 @@ if (isset($deletekey)) {
DBQueryFatal("delete from widearea_privkeys where privkey='$deletekey'");
if (isset($nodeid) && $nodeid) {
DBQueryFatal("delete from widearea_nodeinfo where node_id='$nodeid'");
DBQueryFatal("delete from widearea_accounts where node_id='$nodeid'");
DBQueryFatal("delete from interfaces where node_id='$nodeid'");
DBQueryFatal("delete from nodes where node_id='$nodeid'");
DBQueryFatal("delete from nodes where phys_nodeid='$nodeid'");
DBQueryFatal("delete from node_status where node_id='$nodeid'");
DBQueryFatal("delete from reserved where node_id='$nodeid'");
DBQueryFatal("delete from node_auxtypes where node_id='$nodeid'");
DBQueryFatal("delete from node_activity where node_id='$nodeid'");
$retval = SUEXEC($uid, $TBADMINGROUP, "webdeletenode -b $nodeid",
SUEXEC_ACTION_DIE);
}
header("Location: wideareakeys.php3");
}
......
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