diff --git a/templates/solaris_start_puppet.sh.erb b/files/solaris_start_puppet.sh similarity index 86% rename from templates/solaris_start_puppet.sh.erb rename to files/solaris_start_puppet.sh index 50ac70900..983eae2c6 100644 --- a/templates/solaris_start_puppet.sh.erb +++ b/files/solaris_start_puppet.sh @@ -1,6 +1,6 @@ #!/bin/bash -puppet_pid="<%= @puppet_agent_pid %>" +puppet_pid=$1 while $(kill -0 ${puppet_pid:?}); do sleep 5 done diff --git a/manifests/service/solaris.pp b/manifests/service/solaris.pp index a25dc9054..0245c0656 100644 --- a/manifests/service/solaris.pp +++ b/manifests/service/solaris.pp @@ -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']: