summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Chamberland <chamberland.marc@gmail.com>2020-04-03 21:21:00 -0400
committerMarc Chamberland <chamberland.marc@gmail.com>2020-04-03 21:21:00 -0400
commit33547ea63ac5fe07cb4f1b2e17a54d1e4527ce52 (patch)
treee32a636d3e423a779a46f5ba90cf8a915f05840c
parente563a31272616e82e4488c279a543b1f4e84516e (diff)
downloadchef-33547ea63ac5fe07cb4f1b2e17a54d1e4527ce52.tar.gz
Fix missing dist constants in bootstrap logic
Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com>
-rw-r--r--lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb8
-rw-r--r--lib/chef/knife/core/windows_bootstrap_context.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb b/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb
index 3fe397ed9e..b4da79e453 100644
--- a/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb
+++ b/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb
@@ -109,13 +109,13 @@ goto Version10.0
goto chef_installed
:chef_installed
-@echo Checking for existing chef installation
+@echo Checking for existing <%= Chef::Dist::PRODUCT %> installation
WHERE <%= Chef::Dist::CLIENT %> >nul 2>nul
If !ERRORLEVEL!==0 (
- @echo Existing Chef installation detected, skipping download
+ @echo Existing <%= Chef::Dist::PRODUCT %> installation detected, skipping download
goto key_create
) else (
- @echo No existing installation of chef detected
+ @echo No existing installation of <%= Chef::Dist::PRODUCT %> detected
goto install
)
@@ -272,5 +272,5 @@ echo Validation key written.
<%= client_d %>
<% end -%>
-@echo Starting chef to bootstrap the node...
+@echo Starting <%= Chef::Dist::CLIENT %> to bootstrap the node...
<%= start_chef %>
diff --git a/lib/chef/knife/core/windows_bootstrap_context.rb b/lib/chef/knife/core/windows_bootstrap_context.rb
index d3f55ce94c..ff67ee3689 100644
--- a/lib/chef/knife/core/windows_bootstrap_context.rb
+++ b/lib/chef/knife/core/windows_bootstrap_context.rb
@@ -159,7 +159,7 @@ class Chef
def start_chef
bootstrap_environment_option = bootstrap_environment.nil? ? "" : " -E #{bootstrap_environment}"
start_chef = "SET \"PATH=%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;%SYSTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\;C:\\ruby\\bin;#{ChefConfig::Config.c_opscode_dir}\\#{ChefConfig::Dist::DIR_SUFFIX}\\bin;#{ChefConfig::Config.c_opscode_dir}\\#{ChefConfig::Dist::DIR_SUFFIX}\\embedded\\bin\;%PATH%\"\n"
- start_chef << "chef-client -c #{ChefConfig::Config.etc_chef_dir(true)}/client.rb -j #{ChefConfig::Config.etc_chef_dir(true)}/first-boot.json#{bootstrap_environment_option}\n"
+ start_chef << "#{Chef::Dist::CLIENT} -c #{ChefConfig::Config.etc_chef_dir(true)}/client.rb -j #{ChefConfig::Config.etc_chef_dir(true)}/first-boot.json#{bootstrap_environment_option}\n"
end
def win_wget