Commit 2aa45097 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Do not exit; act like tbshutdown and wait until we get the TERM.

Send a SHUTDOWN state event to keep stated happy.
parent 5f8fea31
......@@ -118,6 +118,7 @@ sub handler () {
$SIG{TERM} = 'IGNORE';
$SIG{INT} = 'IGNORE';
unlink($pidfile);
system("tmcc state SHUTDOWN");
kill('TERM', -$pgrp);
sleep(1);
exit(0);
......@@ -175,7 +176,11 @@ print "Informing Emulab Operations that we're up and running ...\n";
system("tmcc state ISUP");
# Done!
print "Done! Exiting ...\n";
unlink($pidfile);
while (1) {
#
# Loop until killed.
#
sleep(1000);
}
exit(0);
Supports Markdown
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