Commit 20209539 authored by Mac Newbold's avatar Mac Newbold

In a devel tree, put stated pid in TB/locks, and tell tbtest how to find it.

parent b6e9e168
......@@ -68,7 +68,7 @@ END
# Only root should run this - it won't work when run as a user...
# (Or, let an admin run it if it isn't the real one in /usr/testbed/ )
if ($UID && ( $TB == $REALTB || ! TBAdmin($UID) ) ) {
if ($UID && ( $TB eq $REALTB || ! TBAdmin($UID) ) ) {
die("Only root can run this script!\n");
}
......@@ -117,10 +117,7 @@ my $pidfile;
if ( $TB eq $REALTB ) {
$pidfile = "/var/run/stated.pid";
} else {
$ext = $TB;
$ext =~ s/\//\./g;
$pidfile = "/var/run/stated$ext.pid";
debug("Devel. version! $TB -> $pidfile\n");
$pidfile = "$TB/locks/stated.pid";
}
debug("Using pidfile $pidfile\n");
if (-e $pidfile) {
......
......@@ -676,9 +676,7 @@ sub step_test {
}
if ($type eq "full") {
my $ext = $TB;
$ext =~ s/\//\./g;
my $statedpidfile = "/var/run/stated$ext.pid";
my $statedpidfile = "$TB/locks/stated.pid";
my $statedpid = `cat $statedpidfile` ||
prints "WARNING: Unable to find stated pid: $!\n";
if (! kill(15, $statedpid) ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment