示例#1
0
 def _short_circuit(self):
     config = self._config.plugins[self.full_name]
     files = config.get('short_circuit_files', [])
     if files:
         if not short_circuit_files(files):
             log.critical('Unable to short circuit {0} to {1}')
             return False
         else:
             log.debug('Files short-circuited successfully')
             return True
     else:
         log.debug('No short circuit files configured')
         return True
示例#2
0
文件: linux.py 项目: Netflix/aminator
 def _deactivate_provisioning_service_block(self):
     """
     Prevent packages installing the chroot from starting
     For RHEL-like systems, we can use short_circuit which replaces the service call with /bin/true
     """
     config = self._config.plugins[self.full_name]
     files = config.get('short_circuit_files', [])
     if files:
         if not short_circuit_files(self.root_mountspec.mountpoint, files):
             log.warning('Unable to short circuit some files')
             return True
         else:
             log.debug('Files short-circuited successfully')
             return True
     else:
         log.debug('No short circuit files configured')
         return True
示例#3
0
 def _deactivate_provisioning_service_block(self):
     """
     Prevent packages installing the chroot from starting
     For RHEL-like systems, we can use short_circuit which replaces the service call with /bin/true
     """
     config = self._config.plugins[self.full_name]
     files = config.get('short_circuit_files', [])
     if files:
         if not short_circuit_files(self._mountpoint, files):
             log.warning('Unable to short circuit some files')
             return True
         else:
             log.debug('Files short-circuited successfully')
             return True
     else:
         log.debug('No short circuit files configured')
         return True
示例#4
0
 def _deactivate_provisioning_service_block(self):
     """
     Prevent packages installing the chroot from starting
     For RHEL-like systems, we can use short_circuit which replaces the service call with /bin/true
     """
     config = self._config.plugins[self.full_name]
     files = config.get("short_circuit_files", [])
     if files:
         if not short_circuit_files(self._mountpoint, files):
             log.critical("Unable to short circuit {0} to {1}")
             return False
         else:
             log.debug("Files short-circuited successfully")
             return True
     else:
         log.debug("No short circuit files configured")
         return True