Skip to content

Commit

Permalink
(PE-12299) Pass Puppet agent PID as an argument
Browse files Browse the repository at this point in the history
Similar to the improvement made for the Windows install script, pass the
Puppet agent PID as an argument to the solaris service script. This
prevents recreating the file every Puppet run.
  • Loading branch information
Michael Smith committed Mar 18, 2016
1 parent c5932ba commit 262bb94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

puppet_pid="<%= @puppet_agent_pid %>"
puppet_pid=$1
while $(kill -0 ${puppet_pid:?}); do
sleep 5
done
Expand Down
8 changes: 4 additions & 4 deletions manifests/service/solaris.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
}
} elsif $::operatingsystem == 'Solaris' and $::operatingsystemmajrelease == '11' {
file { '/tmp/solaris_start_puppet.sh':
ensure => file,
content => template('puppet_agent/solaris_start_puppet.sh.erb'),
mode => '0755',
ensure => file,
source => 'puppet:///modules/puppet_agent/solaris_start_puppet.sh',
mode => '0755',
} ->
exec { 'solaris_start_puppet.sh':
command => '/tmp/solaris_start_puppet.sh &',
command => "/tmp/solaris_start_puppet.sh ${::puppet_agent_pid} &",
path => '/usr/bin:/bin:/usr/sbin',
}
file { ['/var/opt/lib', '/var/opt/lib/pe-puppet', '/var/opt/lib/pe-puppet/state']:
Expand Down

0 comments on commit 262bb94

Please sign in to comment.