Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
9de52c35
Commit
9de52c35
authored
Mar 11, 2012
by
Jonathon Duerig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid indirect execution of start commands if there is only one.
parent
99a462a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
protogeni/lib/GeniCM.pm.in
protogeni/lib/GeniCM.pm.in
+23
-0
No files found.
protogeni/lib/GeniCM.pm.in
View file @
9de52c35
...
...
@@ -1202,6 +1202,28 @@ sub GetTicketAuxAux($$$$$$$$$)
}
}
elsif (my @services = GeniXML::GetServices($ref)) {
my $startupCommand = undef;
my $startupCount = 0;
foreach my $service (@services) {
if ($service->{'
type
'} eq "execute") {
if ($startupCount == 0) {
$startupCommand = $service->{'
cmd
'};
}
++$startupCount;
}
}
if ($startupCount == 1 && defined($startupCommand)) {
if (! TBcheck_dbslot($startupCommand, "virt_nodes", "startupcmd",
TBDB_CHECKDBSLOT_WARN|TBDB_CHECKDBSLOT_ERROR)) {
$response =
GeniResponse->Create(GENIRESPONSE_BADARGS, undef,
"Invalid startup command");
goto bad;
}
$nodeblob->{'
startupcmd
'} = $startupCommand;
} else { # BEGIN TEMPORARY ELSE
my $count = 0;
my $startfile = $slice_experiment->UserDir() .
"/geni_startup." . $node_nickname;
...
...
@@ -1259,6 +1281,7 @@ sub GetTicketAuxAux($$$$$$$$$)
print
STARTUP
"exit 0
\n
"
;
close
(
STARTUP
);
chmod
(
0755
,
$
startfile
);
}
#
END
TEMPORARY
ELSE
}
my
$
virtnode
=
$
virtexperiment
->
NewTableRow
(
"virt_nodes"
,
$
nodeblob
);
...
...
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