Browse Source

[2617] logged shutdown event of cfgmgr

JINMEI Tatuya 12 years ago
parent
commit
666395baa9

+ 2 - 1
src/lib/python/isc/config/cfgmgr.py

@@ -551,7 +551,7 @@ class ConfigManager:
     def run(self):
     def run(self):
         """Runs the configuration manager."""
         """Runs the configuration manager."""
         self.running = True
         self.running = True
-        while (self.running):
+        while self.running:
             # we just wait eternally for any command here, so disable
             # we just wait eternally for any command here, so disable
             # timeouts for this specific recv
             # timeouts for this specific recv
             self.cc.set_timeout(0)
             self.cc.set_timeout(0)
@@ -566,3 +566,4 @@ class ConfigManager:
                 # Only respond if there actually is something to respond with
                 # Only respond if there actually is something to respond with
                 if answer is not None:
                 if answer is not None:
                     self.cc.group_reply(env, answer)
                     self.cc.group_reply(env, answer)
+        logger.info(CFGMGR_STOPPED_BY_COMMAND)

+ 3 - 0
src/lib/python/isc/config/cfgmgr_messages.mes

@@ -61,6 +61,9 @@ error is given. The most likely cause is that the system does not have
 write access to the configuration database file. The updated
 write access to the configuration database file. The updated
 configuration is not stored.
 configuration is not stored.
 
 
+% CFGMGR_STOPPED_BY_COMMAND received shutdown command, shutting down
+The configuration manager received a shutdown command, and is exiting.
+
 % CFGMGR_STOPPED_BY_KEYBOARD keyboard interrupt, shutting down
 % CFGMGR_STOPPED_BY_KEYBOARD keyboard interrupt, shutting down
 There was a keyboard interrupt signal to stop the cfgmgr daemon. The
 There was a keyboard interrupt signal to stop the cfgmgr daemon. The
 daemon will now shut down.
 daemon will now shut down.