mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes hostname fetching default arguments
This commit is contained in:
parent
1a2e104558
commit
02fb58d935
1 changed files with 10 additions and 2 deletions
|
|
@ -139,17 +139,25 @@ function Start-IcingaAgentInstallWizard()
|
||||||
if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Do you want to manually specify a hostname?' -Default 'n').result -eq 1) {
|
if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Do you want to manually specify a hostname?' -Default 'n').result -eq 1) {
|
||||||
if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Do you want to automatically fetch the hostname with its FQDN?' -Default 'y').result -eq 1) {
|
if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Do you want to automatically fetch the hostname with its FQDN?' -Default 'y').result -eq 1) {
|
||||||
$InstallerArguments += '-AutoUseFQDN 1';
|
$InstallerArguments += '-AutoUseFQDN 1';
|
||||||
$AutoUseFQDN = $TRUE;
|
$InstallerArguments += '-AutoUseHostname 0';
|
||||||
|
$AutoUseFQDN = $TRUE;
|
||||||
|
$AutoUseHostname = $FALSE;
|
||||||
} else {
|
} else {
|
||||||
|
$InstallerArguments += '-AutoUseFQDN 0';
|
||||||
$InstallerArguments += '-AutoUseHostname 1';
|
$InstallerArguments += '-AutoUseHostname 1';
|
||||||
$AutoUseHostname = $TRUE;
|
$AutoUseFQDN = $FALSE;
|
||||||
|
$AutoUseHostname = $TRUE;
|
||||||
}
|
}
|
||||||
if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Do you want to modify the hostname to only include lower case characters?' -Default 'y').result -eq 1) {
|
if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Do you want to modify the hostname to only include lower case characters?' -Default 'y').result -eq 1) {
|
||||||
$InstallerArguments += '-LowerCase 1';
|
$InstallerArguments += '-LowerCase 1';
|
||||||
|
$InstallerArguments += '-UpperCase 0';
|
||||||
$LowerCase = $TRUE;
|
$LowerCase = $TRUE;
|
||||||
|
$UpperCase = $FALSE;
|
||||||
} else {
|
} else {
|
||||||
if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Do you want to modify the hostname to only include upper case characters?' -Default 'n').result -eq 0) {
|
if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Do you want to modify the hostname to only include upper case characters?' -Default 'n').result -eq 0) {
|
||||||
|
$InstallerArguments += '-LowerCase 0';
|
||||||
$InstallerArguments += '-UpperCase 1';
|
$InstallerArguments += '-UpperCase 1';
|
||||||
|
$LowerCase = $FALSE;
|
||||||
$UpperCase = $TRUE;
|
$UpperCase = $TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue