Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc bugfixes #325

Merged
merged 4 commits into from
Jun 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/consul_execute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ConsulExecute < Chef::Resource
default_action(:run)

attribute(:command, kind_of: String, name_attribute: true)
attribute(:environment, kind_of: String, default: { 'PATH' => '/usr/local/bin:/usr/bin:/bin' })
attribute(:environment, kind_of: Hash, default: { 'PATH' => '/usr/local/bin:/usr/bin:/bin' })
attribute(:options, option_collector: true, default: {})

action(:run) do
Expand Down
2 changes: 1 addition & 1 deletion libraries/consul_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ConsulService < Chef::Resource
attribute(:data_dir, kind_of: String, default: lazy { node['consul']['config']['data_dir'] })
# @!attribute config_dir
# @return [String]
attribute(:config_dir, kind_of: String, default: lazy { node['consul']['config']['config_dir'] })
attribute(:config_dir, kind_of: String, default: lazy { node['consul']['service']['config_dir'] })
# @!attribute nssm_params
# @return [String]
attribute(:nssm_params, kind_of: Hash, default: lazy { node['consul']['service']['nssm_params'] })
Expand Down
2 changes: 1 addition & 1 deletion templates/default/sysvinit.service.erb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ _start() {
daemon \
--pidfile=$pidfile \
--user=$user \
" { $exec <%= @daemon_options %> &>> $logfile & } ; echo \$! >| $pidfile "
" { $exec <%= @daemon_options %> >> $logfile 2>&1 & } ; echo \$! >| $pidfile "
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $lockfile
Expand Down
9 changes: 9 additions & 0 deletions test/integration/helpers/serverspec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@
set :backend, :cmd
set :os, family: 'windows'
end

# Tells serverspec to use a login shell for running chkconfig/service,
# which prevents false error reports on Centos 5.
begin
if File.read("/etc/redhat-release") =~ /release 5\./
Specinfra.configuration.login_shell = true
end
rescue SystemCallError
end