openssh: flip-flop, enabled always wins #1750

This commit is contained in:
Franco Fichtner 2017-08-09 14:27:51 +02:00
parent db1b20b893
commit f635d8d873

View File

@ -71,11 +71,11 @@ function openssh_configure_do($verbose = false)
$sshcfg = null;
if (!isset($config['system']['ssh']['noauto']) && is_install_media()) {
if (isset($config['system']['ssh']['enabled'])) {
$sshcfg = $config['system']['ssh'];
} elseif (!isset($config['system']['ssh']['noauto']) && is_install_media()) {
/* only revert to installer config when ssh is not set at all */
$sshcfg = array('permitrootlogin' => 1, 'passwordauth' => 1);
} elseif (isset($config['system']['ssh']['enabled'])) {
$sshcfg = $config['system']['ssh'];
}
if ($sshcfg === null) {