Commit 1770abd9 authored by Leigh B. Stoller's avatar Leigh B. Stoller

When deleting a node, need to regen exports, named maps, and

dhcpd.conf so that all trace is really gone.
parent 8d6f4b03
#!/usr/bin/perl -w #!/usr/bin/perl -w
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2004 University of Utah and the Flux Group. # Copyright (c) 2004, 2005 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
# deletenode - a script for deleting a node from the database
#
# #
# deletenode - a script for deleting a node from the database # Configure variables
# #
my $TB = "@prefix@";
use lib '@prefix@/lib'; use lib '@prefix@/lib';
use libdb; use libdb;
...@@ -98,4 +100,19 @@ while (my ($table, $clist) = each %clean_tables) { ...@@ -98,4 +100,19 @@ while (my ($table, $clist) = each %clean_tables) {
} }
} }
#
# Need to run a bunch of stuff to really kill off the node.
#
print "Regenerating exports file and restarting daemon.\n";
if (system("$TB/sbin/exports_setup")) {
print STDERR "*** Failed to reset mountpoints.\n";
}
print "Regenerating named maps and restarting daemon.\n";
if (system("$TB/sbin/named_setup")) {
print STDERR "*** Failed to reset named maps.\n";
}
print "Regenerating DHCPD config file and restarting daemon.\n";
if (system("$TB/sbin/dhcpd_makeconf -i -r")) {
print STDERR "*** Failed to reset DHCPD config file.\n";
}
exit 0; exit 0;
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