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-stable
Commits
22e420d4
Commit
22e420d4
authored
Sep 21, 2007
by
Leigh B. Stoller
Browse files
If the template being modified is "active" then move the active bit to
the child template (parent no longer active).
parent
63cfbd3a
Changes
2
Hide whitespace changes
Inline
Side-by-side
tbsetup/Template.pm.in
View file @
22e420d4
...
...
@@ -173,6 +173,8 @@ sub logfile($) {
return
((
! ref($_[0])) ? -1 : $_[0]->{'TEMPLATE'}->{'logfile'}); }
sub
logfile_open
($)
{
return
((
! ref($_[0])) ? -1 : $_[0]->{'TEMPLATE'}->{'logfile_open'}); }
sub
active
($)
{
return
((
! ref($_[0])) ? -1 : $_[0]->{'TEMPLATE'}->{'active'}); }
#
#
Lookup
a
template
given
an
experiment
index
.
...
...
@@ -1776,6 +1778,16 @@ sub InActivate($)
return 0;
}
sub IsActive($)
{
my ($self) = @_;
# Must be a real reference.
return -1
if (! ref($self));
return $self->active();
}
# Improve this at some point.
sub Recurse($$)
...
...
tbsetup/template_create.in
View file @
22e420d4
...
...
@@ -786,6 +786,15 @@ system("$makegraph $guid");
fatal
(
-
1
,
"
Error generating template graph.
")
if
(
$?
);
#
# Make the new template active (and the parent template inactive) if the
# parent was already active.
#
if
(
$parent_template
->
IsActive
())
{
$parent_template
->
InActivate
();
$template
->
Activate
();
}
#
# Update parent to point to most recent child.
#
...
...
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