From 7d5986c504d9ca0d0d405b12e1b7ce7dab40d69d Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Mon, 3 Aug 2020 19:21:55 +0200 Subject: [PATCH] Fixes wrong argument defaults set by Icinga Director Self-Service Fixes #91 --- doc/31-Changelog.md | 1 + lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/31-Changelog.md b/doc/31-Changelog.md index c0cdb0f..eda916c 100644 --- a/doc/31-Changelog.md +++ b/doc/31-Changelog.md @@ -30,6 +30,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic * [#85](https://github.com/Icinga/icinga-powershell-framework/issues/85), Fix incorrect handling to empty service user password which was configured as empty `String` instead of `$null` `SecureString` object * [#89](https://github.com/Icinga/icinga-powershell-framework/issues/89), Fix file type question during `Get-IcingaCheckCommandConfig` generation in Windows 2012 R2 and older * [#90](https://github.com/Icinga/icinga-powershell-framework/issues/90), Fix file type question during Icinga Agent installation on Windows 2012 R2 while using a custom installation target +* [#91](https://github.com/Icinga/icinga-powershell-framework/issues/91), Fix wrong default values being set for installer arguments by using the Icinga Director Self-Service API ## 1.1.2 (2020-07-01) diff --git a/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 b/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 index 77aa5b7..8e609c3 100644 --- a/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 +++ b/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 @@ -711,8 +711,8 @@ function Set-IcingaWizardArgument() if ($DirectorArgs.Arguments.ContainsKey($WizardArg)) { $RetValue = $DirectorArgs.Arguments[$WizardArg]; } else { - if ($null -ne $Value -Or [string]::IsNullOrEmpty($Value) -eq $FALSE) { + if ($null -ne $Value -And [string]::IsNullOrEmpty($Value) -eq $FALSE) { $InstallerArguments = Add-InstallerArgument ` -InstallerArguments $InstallerArguments ` -Key $WizardArg `