summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Singh <vivek.singh@msystechnologies.com>2020-09-17 12:17:40 +0530
committerTim Smith <tsmith84@gmail.com>2021-02-02 11:58:03 -0800
commitb1470272c084fadf658f35d03e28a66f8e1052fd (patch)
treedd51201bb5366ae71de40ab9bdf1e88978da8998
parent547ee37d530aa1c3b2c2bc0f9122261cd16e65f2 (diff)
downloadchef-b1470272c084fadf658f35d03e28a66f8e1052fd.tar.gz
Fix AIX su password match string
Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
-rw-r--r--lib/chef/knife/bootstrap.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index 578511958e..13a62b4de0 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -609,7 +609,7 @@ class Chef
def bootstrap_run_command(cmd, limit = 3)
r = connection.run_command(cmd) do |data, ch|
ui.msg("#{ui.color(" [#{connection.hostname}]", :cyan)} #{data}")
- ch.send_data("#{config[:su_password] || config[:connection_password]}\n") if data == "Password: "
+ ch.send_data("#{config[:su_password] || config[:connection_password]}\n") if data.match?("Password:")
end
if r.exit_status != 0
stderr = (r.stderr + r.stdout).strip