summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2013-10-25 13:52:48 -0700
committersersut <serdar@opscode.com>2013-10-25 13:52:48 -0700
commit492b3347e33115cdcff99f6a5ce41eb6d8baca32 (patch)
tree34b4fac2a42eb2cb0426bd7cf6258560d7ce70b5
parent123c79b1d249e99e50d1002dc543cb8044a0c9ba (diff)
downloadchef-492b3347e33115cdcff99f6a5ce41eb6d8baca32.tar.gz
do_windows_admin_check() function depends on ohai information if config file doesn't have :node_name.
So we should run it after OHAI.
-rw-r--r--lib/chef/client.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index 837f8ad432..30b714cded 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -471,10 +471,6 @@ class Chef
# === Returns
# true:: Always returns true.
def do_run
- # Check for windows administrator rights incase they create an
- # issue while trying to create / acquire run_lock.
- do_windows_admin_check
-
runlock = RunLock.new(Chef::Config.lockfile)
runlock.acquire
# don't add code that may fail before entering this section to be sure to release lock
@@ -497,6 +493,8 @@ class Chef
Chef::Log.info("Starting Chef Run for #{node.name}")
run_started
+ do_windows_admin_check
+
run_context = setup_run_context
converge(run_context)