File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -106,10 +106,14 @@ def usage(msg):
106106# to allow samba to work with Linux test driver
107107
108108network_shared_path = os .path .join (top_dir , 'network_shared' )
109+
109110launch_fn = os .path .join (network_shared_path , as_host ) + '.smf_launch'
110111if os .path .exists (launch_fn ): # avoid left-over launch files
111112 os .unlink (launch_fn )
112113log .info ('launch filename ' + launch_fn )
114+
115+ shutdown_fn = os .path .join (network_shared_path , 'shutdown_launchers.tmp' )
116+ log .info ('daemon shutdown filename ' + shutdown_fn )
113117while True :
114118 try :
115119 with open (launch_fn , 'r' ) as f :
@@ -125,4 +129,7 @@ def usage(msg):
125129 if e .errno != errno .ENOENT :
126130 raise e
127131 finally :
132+ if os .path .exists (shutdown_fn ): # avoid left-over launch files
133+ log .info ('saw daemon shutdown file %s, exiting' % shutdown_fn )
134+ sys .exit (0 )
128135 time .sleep (1 )
You can’t perform that action at this time.
0 commit comments