Skip to content
GitLab
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
fb247a24
Commit
fb247a24
authored
Oct 14, 2016
by
Leigh B Stoller
Browse files
Install the event perl modules on subboss. Add MarkDaemon ultilties
from boss libtestbed,pm into clientside version of same file.
parent
110ef79f
Changes
4
Hide whitespace changes
Inline
Side-by-side
clientside/lib/GNUmakefile.in
View file @
fb247a24
#
# Copyright (c) 2000-201
4
University of Utah and the Flux Group.
# Copyright (c) 2000-201
6
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -43,7 +43,7 @@ control-install: control-install-subdirs
fs-install: fs-install-subdirs
client-install: client-install-subdirs
subboss: client
subboss-install:
client
-install
subboss-install:
subboss
-install
-subdirs
clean: clean-subdirs
distclean: distclean-subdirs
mfs frisbee-mfs newnode-mfs:
...
...
clientside/lib/event/GNUmakefile.in
View file @
fb247a24
#
# Copyright (c) 2000-201
5
University of Utah and the Flux Group.
# Copyright (c) 2000-201
6
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -179,6 +179,7 @@ fs-install:
client: $(LIBS)
client-install: client # client-libinstall
client-libinstall: client-pylibinstall client-pllibinstall
subboss-install: client client-libinstall
#
# XXX Fix the python install location.
...
...
clientside/lib/libtb/GNUmakefile.in
View file @
fb247a24
#
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# Copyright (c) 2000-2012
, 2016
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -32,6 +32,7 @@ all: libtb.a
client: libtb-nodb.a
cmp -s libtb-nodb.a libtb.a || cp -pf libtb-nodb.a libtb.a
client-install: client
subboss-install: client
# The point of this is to make sure a nodb version of the library is
# built during the ops-install target when installing a new emulab.
...
...
clientside/tmcc/common/libtestbed.pm
View file @
fb247a24
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-201
5
University of Utah and the Flux Group.
# Copyright (c) 2000-201
6
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -37,6 +37,7 @@ use Exporter;
TBSCRIPTLOCK_WOULDBLOCK TBSCRIPTLOCK_INTERRUPTED
TBSCRIPTLOCK_INTERRUPTIBLE
TBTimeStamp TBTimeStampWithDate TBBackGround ReOpenLog
CheckDaemonRunning MarkDaemonRunning MarkDaemonStopped)
;
);
# Must come after package declaration!
...
...
@@ -465,5 +466,54 @@ sub TBScriptUnlock(;$)
}
}
#
# Check for the existence of a pid file and see if that file is
# running. Mostly cause of devel tree versions.
#
sub
CheckDaemonRunning
($)
{
my
(
$name
)
=
@_
;
my
$pidfile
=
"
/var/run/
${name}
.pid
";
if
(
-
e
$pidfile
)
{
my
$opid
=
`
cat
$pidfile
`;
if
(
$opid
=~
/^(\d*)$/
)
{
$opid
=
$
1
;
}
else
{
print
STDERR
"
$pidfile
exists, but
$opid
is malformed
\n
";
return
1
;
}
if
(
kill
(
0
,
$opid
))
{
print
STDERR
"
$pidfile
exists, and process
$opid
is running
\n
";
return
1
;
}
unlink
(
$pidfile
);
}
return
0
;
}
#
# Mark a daemon as running.
#
sub
MarkDaemonRunning
($)
{
my
(
$name
)
=
@_
;
my
$pidfile
=
"
/var/run/
${name}
.pid
";
if
(
system
("
echo '
$PID
' >
$pidfile
"))
{
print
STDERR
"
Could not create
$pidfile
\n
";
return
-
1
;
}
return
0
;
}
sub
MarkDaemonStopped
($)
{
my
(
$name
)
=
@_
;
my
$pidfile
=
"
/var/run/
${name}
.pid
";
unlink
(
$pidfile
);
return
0
;
}
1
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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