Esempio n. 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
Esempio n. 2
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.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
Esempio n. 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
Esempio n. 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