From dd48d827a1bffe3825ecc2a34bedb7a641d92613 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 12 Nov 2019 11:31:46 +0100 Subject: [sysconfig/runmode] Remove "noSysconfig" functionality Was of limited use and not properly implemented anyways. --- modules-available/sysconfig/inc/configtgz.inc.php | 32 ----------------------- 1 file changed, 32 deletions(-) (limited to 'modules-available/sysconfig/inc/configtgz.inc.php') diff --git a/modules-available/sysconfig/inc/configtgz.inc.php b/modules-available/sysconfig/inc/configtgz.inc.php index 374cb5e0..cf9bf041 100644 --- a/modules-available/sysconfig/inc/configtgz.inc.php +++ b/modules-available/sysconfig/inc/configtgz.inc.php @@ -102,10 +102,6 @@ class ConfigTgz if (!empty($module['filepath']) && file_exists($module['filepath'])) { $files[] = $module['filepath']; } - if ($module['moduletype'] === 'SshConfig') { - // HACK XXX TODO Global + SSH ugly - self::rebuildEmptyGlobalConfig(); - } } $task = self::recompress($files, $this->file); @@ -233,34 +229,6 @@ class ConfigTgz $configTgz->generate(); } } - // Build the global "empty" config that just includes global hooks - self::rebuildEmptyGlobalConfig(); - } - - /** - * Rebuild the general "empty" config that only contains global hook modules - * and forced ones. - */ - private static function rebuildEmptyGlobalConfig() - { - static $onceOnly = false; - if ($onceOnly) - return; - $onceOnly = true; - // HACK TODO XXX -- just stuff (global) ssh config into this one for now, needs proper fix :-( - $res = Database::simpleQuery("SELECT DISTINCT cm.filepath FROM configtgz_module cm - INNER JOIN configtgz_x_module cxm USING (moduleid) - INNER JOIN configtgz_location cl USING (configid) - WHERE cm.moduletype = 'SshConfig' AND cm.status = 'OK' - ORDER BY locationid ASC"); - $extra = []; - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { - if (file_exists($row['filepath'])) { - $extra[] = $row['filepath']; - break; - } - } - self::recompress($extra, SysConfig::GLOBAL_MINIMAL_CONFIG); } /** -- cgit v1.2.3-55-g7522