From 6b5d3a94ed1b62728957b04b36a08327837b0b5f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 12 Jul 2017 18:39:21 +0200 Subject: [runmode] Tweaks, support NO_CONFIG and systemd target --- modules-available/runmode/inc/runmode.inc.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'modules-available/runmode/inc') diff --git a/modules-available/runmode/inc/runmode.inc.php b/modules-available/runmode/inc/runmode.inc.php index 5b59f1c1..916866f1 100644 --- a/modules-available/runmode/inc/runmode.inc.php +++ b/modules-available/runmode/inc/runmode.inc.php @@ -11,7 +11,7 @@ class RunMode * @param string $module name of module * @return RunModeModuleConfig|false */ - private static function getModuleConfig($module) + public static function getModuleConfig($module) { if (isset(self::$moduleConfigs[$module])) return self::$moduleConfigs[$module]; @@ -154,10 +154,18 @@ class RunModeModuleConfig * @var string Name of function that turns a modeId into a string */ public $getModeName = false; + /** + * @var string Name of function that is called to add additional config entries + */ + public $configHook = false; /** * @var bool Consider this a normal client that should e.g. be shown in client statistics by default */ public $isClient = false; + /** + * @var bool If true, config.tgz should not be downloaded by the client + */ + public $noSysconfig = false; public function __construct($file) { @@ -168,7 +176,9 @@ class RunModeModuleConfig $this->loadType($data, 'systemdDisableTargets', 'array'); $this->loadType($data, 'systemdEnableTargets', 'array'); $this->loadType($data, 'getModeName', 'string'); - $this->loadType($data, 'isClient', 'string'); + $this->loadType($data, 'configHook', 'string'); + $this->loadType($data, 'isClient', 'boolean'); + $this->loadType($data, 'noSysconfig', 'boolean'); } private function loadType($data, $key, $type) -- cgit v1.2.3-55-g7522