Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-stable
Commits
1770abd9
Commit
1770abd9
authored
Apr 15, 2005
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When deleting a node, need to regen exports, named maps, and
dhcpd.conf so that all trace is really gone.
parent
8d6f4b03
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
utils/deletenode.in
utils/deletenode.in
+20
-3
No files found.
utils/deletenode.in
View file @
1770abd9
#!/usr/bin/perl -w
#
# 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.
#
# 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
libdb
;
...
...
@@ -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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment