Recursively bootstraps the service, retrying if necessary until a system partition group is found.
359049
private CompletableFuture<Void> bootstrap(int attempt, CompletableFuture<Void> future) {
    Futures.allOf(membershipService.getMembers().stream()
        .filter(node -> !node.id().equals(membershipService.getLocalMember().id()))
        .map(node -> bootstrap(node))
        .collect(Collectors.toList()))
        .whenComplete((result, error) -> {
          if (error == null) {
            if (systemGroup == null) {
              LOGGER.warn("Failed to locate management group via bootstrap nodes. Please ensure partition "
                  + "groups are configured either locally or remotely and the node is able to reach partition group members.");
              threadContext.schedule(Duration.ofSeconds(FIBONACCI_NUMBERS[Math.min(attempt, 4)]), () -> bootstrap(attempt + 1, future));
            } else if (groups.isEmpty() && attempt < MAX_PARTITION_GROUP_ATTEMPTS) {
              LOGGER.warn("Failed to locate partition group(s) via bootstrap nodes. Please ensure partition "
                  + "groups are configured either locally or remotely and the node is able to reach partition group members.");
              threadContext.schedule(Duration.ofSeconds(FIBONACCI_NUMBERS[Math.min(attempt, 4)]), () -> bootstrap(attempt + 1, future));
            } else {
              future.complete(null);
            }
          } else {
            future.completeExceptionally(error);
          }
        });
    return future;
  }
521213
def _process_restartcheck_result(rs_result, **kwargs):
    '''
    
    '''
    if 'No packages seem to need to be restarted' in rs_result:
        return
    reboot_required = False
    for rstr in rs_result:
        if 'System restart required' in rstr:
            _update_nilrt_restart_state()
            __salt__['system.set_reboot_required_witnessed']()
            reboot_required = True
    if kwargs.get('always_restart_services', True) or not reboot_required:
        for rstr in rs_result:
            if 'System restart required' not in rstr:
                service = os.path.join('/etc/init.d', rstr)
                if os.path.exists(service):
                    __salt__['cmd.run']([service, 'restart'])
1110295
def reboot(gandi, background, resource):
    
    output_keys = ['id', 'type', 'step']

    resource = sorted(tuple(set(resource)))
    opers = gandi.iaas.reboot(resource, background)
    if background:
        for oper in opers:
            output_generic(gandi, oper, output_keys)

    return opers
775438
public static function boot(): void
    {
        parent::boot();
        static::bootStapler();

        // Modify file name before saving.
        static::saving(function (CategoryIcon $categoryIcon) {
            if ($categoryIcon->isDirty('icon_file_name') && !is_null($categoryIcon->icon_file_name)) {
                $pathInfo = pathinfo(
                    $categoryIcon->icon->originalFileName()
                );

                if ($pathInfo && isset($pathInfo['extension'])) {
                    $newFilename = md5(time()) . '.' . $pathInfo['extension'];
                    $categoryIcon->icon->instanceWrite('file_name', $newFilename);
                }
            }
        });
    }
1033088
def bootcdrom(reboot = false, persistent = false)
      bootstatus = config.bootcdrom(persistent)
      # Only reboot if setting the boot flag was successful
      power.cycle if reboot && bootstatus
    end
1207682
protected function bootConfiguration()
    {
        $path = $this->extensionPath . '/../';
        $this->addConfigComponent($this->routeGroup, $this->routeGroup, "{$path}/resources/config");
        $this->addLanguageComponent($this->routeGroup, $this->routeGroup, "{$path}/resources/lang");
        $this->addViewComponent($this->routeGroup, $this->routeGroup, "{$path}/resources/views");
    }
587392
public static function bootRequired()
	{
		// on test do not load plugins
		if(self::isUnableToRunPlugins())
		{
			return;
		}

		foreach (self::$required as $plugin)
		{
			require_once __DIR__ . DS . $plugin;
		}

	}
99885
public function boot()
    {
        $path = \realpath(__DIR__.'/../');

        $this->addConfigComponent('orchestra/memory', 'orchestra/memory', "{$path}/config");

        if (! $this->hasPackageRepository()) {
            $this->bootUnderLaravel($path);
        }

        $this->loadMigrationsFrom([
            "{$path}/database/migrations",
        ]);

        $this->bootMemoryEvent();
    }
178795
public function boot()
    {
        if ($this->booted) {
            return;
        }

        array_walk($this->serviceProviders, function($provider)
        {
            $this->bootProvider($provider);
        });

        $this->bootApplication();
    }
582247
public function boot() {

		if (!$this->booted) {

			if(!isset($this['debug'])) {
				$this['debug'] = false;
			}

			if(!isset($this['salt'])) {
				$this['salt'] = md5(__DIR__);
			}

			date_default_timezone_set($this['timezone']);

			$this->initialize();

		}

		parent::boot();
	}
953637
public function boot()
    {
        parent::boot();

        $this->publishConfig();
        $this->publishFactories();

        Auth::$runsMigrations ? $this->loadMigrations() : $this->publishMigrations();
    }
837901
protected static function bootNtrustRoleTrait()
    {
        static::saved(function() {
            self::clearCache();
        });

        static::deleted(function($role) {
            self::clearCache($role);
        });

        if(method_exists(self::class, 'restored')) {
            static::restored(function($role) {
                self::clearCache($role);
            });
        }
    }
382981
function(service, credentials) {
    Services.load(service);
    process.nextTick(function() {
      Services.boot(service, credentials);
    }.bind(this));
  }
607221
public function boot()
    {
        $path = realpath(__DIR__ . '/../resources');
        $this->addConfigComponent('antares/memory', 'antares/memory', $path . '/config');
        if (!$this->hasPackageRepository()) {
            $this->bootUnderLaravel($path);
        }
        $this->bootMemoryEvent();
        Model\Permission::observe(new Observer\PermissionObserver());
        \Antares\Model\UserRole::observe(new Observer\PermissionObserver());
        \Antares\Model\Role::observe(new Observer\PermissionObserver());
        \Antares\Model\Action::observe(new Observer\PermissionObserver());
    }
854918
protected function boot(): void
    {
        // boot extensions
        foreach ($this->extensionManager->getExtensions() as $extension) {
            if ($extension->isActivated()) {
                $extension->boot();
            }
        }

        // boot app
        $this->dispatch(new RoutesWillBeLoaded($this->router));
        $this->dispatch(new RoutesHaveBeenLoaded($this->router));

        // send back responses
        try {
            $response = $this->router->getResponse();
            $response->send();
        } catch (RouteNotFoundException $exception) {
            throw new HttpNotFoundException();
        } catch (ResourceNotFoundException $exception) {
            throw new HttpNotFoundException();
        } catch (MethodNotAllowedException $exception) {
            throw new HttpMethodNotAllowedException();
        }
    }
1264340
private static void boot(final String[] args, final ThreadGroup tg)
   {
      try
      {
         Properties properties = loadProperties();

         List<String> order = new ArrayList<String>(5);
         order.add(".xml");
         order.add(".rar");
         order.add("-ra.xml");
         order.add("-ds.xml");
         order.add(".war");

         KernelConfiguration kernelConfiguration = new KernelConfiguration();
         String configurationName = configurationString(properties, "name", DEFAULT_NAME);

         kernelConfiguration = kernelConfiguration.name(configurationName);
         kernelConfiguration = kernelConfiguration.classLoader(ClassLoaderFactory.TYPE_PARENT_FIRST);

         kernelConfiguration =
            kernelConfiguration.management(configurationBoolean(properties, "management", true));

         kernelConfiguration = 
            kernelConfiguration.parallelDeploy(configurationBoolean(properties, "parallel.deploy", true));

         kernelConfiguration =
            kernelConfiguration.remoteAccess(configurationBoolean(properties, "remote.access", true));

         kernelConfiguration =
            kernelConfiguration.remotePort(configurationInteger(properties, "remote.port", 1202));

         kernelConfiguration = kernelConfiguration.eventListener(new PreClassLoaderEventListener());
         kernelConfiguration = kernelConfiguration.eventListener(new PostClassLoaderEventListener());
         kernelConfiguration = kernelConfiguration.command(new Shutdown());
         kernelConfiguration = kernelConfiguration.deploymentOrder(new DeploymentOrder(order));

         kernelConfiguration = 
            kernelConfiguration.remoteJmxAccess(configurationBoolean(properties, "remote.jmx.access", true));

         kernelConfiguration = 
            kernelConfiguration.usePlatformMBeanServer(configurationBoolean(properties, "use.platform.mbeanserver",
                                                                            true));

         kernelConfiguration = 
            kernelConfiguration.beanManagement(configurationBoolean(properties, "bean.management", true));

         applySystemProperties(properties);

         String home = SecurityActions.getSystemProperty(configurationName + ".home");
         if (home != null)
         {
            kernelConfiguration.home(new File(home).toURI().toURL());
         }
         else
         {
            home = new File(".").toURI().toURL().toString();
            File root = new File(new URI(home.substring(0, home.lastIndexOf("bin"))));
            kernelConfiguration.home(root.toURI().toURL());
         }

         if (args != null && args.length > 0)
         {
            for (int i = 0; i < args.length; i++)
            {
               if ("-b".equals(args[i]))
               {
                  kernelConfiguration.bindAddress(args[++i]);
               }
            }
         }

         if (tg != null)
            kernelConfiguration.threadGroup(tg);

         kernel = KernelFactory.create(kernelConfiguration);
         kernel.startup();

         initLogging(SecurityActions.getThreadContextClassLoader());
      }
      catch (Throwable t)
      {
         error(t.getMessage(), t);
      }
   }
520928
def restart(name):
    '''
    
    '''
    if _service_is_upstart(name):
        cmd = 'restart {0}'.format(name)
    else:
        cmd = '/sbin/service {0} restart'.format(name)
    return not __salt__['cmd.retcode'](cmd, python_shell=False)