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-devel
Commits
a62bd59b
Commit
a62bd59b
authored
Aug 17, 2006
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If no agents are specified (and thus no UID given), call "tmcc creator"
to get a UID to use.
parent
4ce998a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
tmcd/common/config/rc.progagent
tmcd/common/config/rc.progagent
+23
-0
No files found.
tmcd/common/config/rc.progagent
View file @
a62bd59b
...
...
@@ -143,6 +143,29 @@ sub doboot()
}
unlink
$CONFIG
;
#
# We want to run program-agent even if there are currently no
# registered agents. But to do that, we need a UID which we
# get from the TMCC creator command. Note that if we do not
# get a UID, we just exit normally without starting the agent.
# This is backward compatible and enables us to boot up unallocated
# nodes (though I am not sure they would ever reach this script).
#
if (
@agents
== 0) {
my
@tmccresults
;
if (tmcc(TMCCCMD_CREATOR, undef,
\@
tmccresults) < 0) {
fatal(
"
Could
not
get
UID
for
progagent
from
server
!
"
);
}
if (
$tmccresults
[0] =~ / SWAPPER=([-
\
w]*)/) {
push(
@agents
,
"
UID
=
$
1
\
n
"
);
} elsif (
$tmccresults
[0] =~ /^CREATOR=([-
\
w]*)/) {
push(
@agents
,
"
UID
=
$
1
\
n
"
);
} else {
warning(
"
Cannot
determine
UID
for
program
agent
,
not
running
"
);
exit(0);
}
}
#
# Write the data to the file. The rc script will interpret it.
# Note that one of the lines (the first) indicates what user to
...
...
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