Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
c8c2b569
Commit
c8c2b569
authored
Feb 08, 2002
by
Leigh B. Stoller
Browse files
Kill of savevlans since its simply a snapshot of DB state, and not
very useful by itself anyway.
parent
a73e627e
Changes
6
Hide whitespace changes
Inline
Side-by-side
configure
View file @
c8c2b569
...
...
@@ -1139,7 +1139,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tbsetup/startexp tbsetup/endexp tbsetup/webstartexp tbsetup/webendexp
\
tbsetup/snmpit tbsetup/ns2ir/GNUmakefile
\
tbsetup/ns2ir/parse.tcl tbsetup/ns2ir/tb_compat.tcl
\
tbsetup/ns2ir/sim.tcl
tbsetup/savevlans
tbsetup/db2ns
\
tbsetup/ns2ir/sim.tcl tbsetup/db2ns
\
tbsetup/tbprerun tbsetup/tbswapin tbsetup/tbswapout tbsetup/tbend
\
tbsetup/tbreport tbsetup/named_setup tbsetup/exports_setup
\
tbsetup/checkpass/GNUmakefile tbsetup/assign_wrapper tbsetup/ptopgen
\
...
...
configure.in
View file @
c8c2b569
...
...
@@ -224,7 +224,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tbsetup/startexp tbsetup/endexp tbsetup/webstartexp tbsetup/webendexp \
tbsetup/snmpit tbsetup/ns2ir/GNUmakefile \
tbsetup/ns2ir/parse.tcl tbsetup/ns2ir/tb_compat.tcl \
tbsetup/ns2ir/sim.tcl
tbsetup/savevlans
tbsetup/db2ns \
tbsetup/ns2ir/sim.tcl tbsetup/db2ns \
tbsetup/tbprerun tbsetup/tbswapin tbsetup/tbswapout tbsetup/tbend \
tbsetup/tbreport tbsetup/named_setup tbsetup/exports_setup \
tbsetup/checkpass/GNUmakefile tbsetup/assign_wrapper tbsetup/ptopgen \
...
...
tbsetup/GNUmakefile.in
View file @
c8c2b569
...
...
@@ -11,7 +11,7 @@ include $(OBJDIR)/Makeconf
SUBDIRS = checkpass ns2ir
BIN_STUFF = power snmpit tbend tbswapin tbswapout tbprerun tbreport \
os_load
savevlans
startexp endexp batchexp swapexp \
os_load startexp endexp batchexp swapexp \
node_reboot nscheck node_update savelogs node_control
# Stuff that mere users get on plastic.
...
...
@@ -86,8 +86,6 @@ post-install:
chmod u+s $(INSTALL_SBINDIR)/named_setup
chown root $(INSTALL_SBINDIR)/exports_setup
chmod u+s $(INSTALL_SBINDIR)/exports_setup
chown root $(INSTALL_BINDIR)/savevlans
chmod u+s $(INSTALL_BINDIR)/savevlans
chown root $(INSTALL_SBINDIR)/setgroups
chmod u+s $(INSTALL_SBINDIR)/setgroups
chown root $(INSTALL_LIBEXECDIR)/console_setup
...
...
tbsetup/savevlans.in
deleted
100644 → 0
View file @
a73e627e
#!/usr/bin/perl -wT
#
# savevlans - dump vlans table into a file, suitable for restoration with
# "load data infile '$name' replace into table vlans;"
#
#
# Configure variables
#
my
$TBROOT
=
"
@prefix
@
";
my
$TESTMODE
=
@TESTMODE@
;
#
# Untaint the path
#
$ENV
{'
PATH
'}
=
"
/bin:/usr/bin
";
delete
@ENV
{'
IFS
',
'
CDPATH
',
'
ENV
',
'
BASH_ENV
'};
#
# Turn off line buffering on output
#
$|
=
1
;
#
# Load the Testbed support stuff.
#
use
lib
"
@prefix
@/lib
";
use
libdb
;
use
libtestbed
;
# Gen up a file name. Technically unsafe, but not likely to be a problem.
my
$name
=
"
vlans-
"
.
TBDateTimeFSSafe
();
print
"
Saving VLAN configuration to '
$name
'
\n
";
DBQueryFatal
("
select * from vlans into outfile '/tmp/
$name
'
");
system
("
mv /tmp/
$name
$TBROOT
/backup/
$name
")
&&
die
("
*** Could not move /tmp/
$name
to
$TBROOT
/backup/
$name
!
\n
");
chown
(
0
,
601
,
"
$TBROOT
/backup/
$name
")
||
die
("
*** Could not chown
$TBROOT
/backup/
$name
: $!
\n
");
chmod
(
0444
,
"
$TBROOT
/backup/
$name
")
||
die
("
*** Could not chmod
$TBROOT
/backup/
$name
: $!
\n
");
tbsetup/tbswapin.in
View file @
c8c2b569
...
...
@@ -53,11 +53,6 @@ sub cleanup {
if
(
system
("
snmpit -r
$pid
$eid
"))
{
print
STDERR
"
*** Failed to clean up VLANs
\n
";
}
print
STDERR
"
Backing up VLAN configuration
\n
";
if
(
system
("
savevlans
"))
{
print
STDERR
"
*** WARNING: Failed to back up VLAN configuration
\n
";
}
}
print
STDERR
"
Freeing up nodes.
\n
";
...
...
@@ -127,14 +122,6 @@ if (system("snmpit -t $pid $eid")) {
#
$cleanvlans
=
1
;
print
"
Backing up VLAN configuration.
\n
";
if
(
system
("
savevlans
"))
{
print
STDERR
"
*** WARNING: Failed to back up VLAN configuration.
\n
";
#
# This is a non-fatal error.
#
}
print
"
Setting up mountpoints.
\n
";
if
(
system
("
exports_setup
"))
{
print
STDERR
"
*** Failed to setup mountpoints.
\n
";
...
...
tbsetup/tbswapout.in
View file @
c8c2b569
...
...
@@ -94,11 +94,6 @@ if (! $TESTMODE) {
print
STDERR
"
*** Failed to reset VLANs.
\n
";
$errors
=
1
;
}
print
"
Backing up VLAN configuration.
\n
";
if
(
system
("
savevlans
"))
{
print
STDERR
"
*** WARNING: Failed to back up VLAN configuration.
\n
";
}
}
print
"
Freeing resources.
\n
";
...
...
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