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