Odd that it works then. I've added the block.

Ian.


On Thu, Jan 16, 2014 at 9:59 AM, Peter Donald <notifications@github.com>wrote:

> In providers/domain.rb:
>
> > @@ -282,6 +283,20 @@ def replace_in_domain_file(key, value)
> >      action :delete
> >    end
> >
> > +  # There is a bug in the Glassfish 4 domain creation that puts the master-password in the wrong spot. This copies it back.
> > +  #file "#{domain_dir_path}/master-password" do
> > +  ruby_block "copy master-password" do
> > +    source_file = "#{domain_dir_path}/config/master-password"
> > +    dest_file = "#{domain_dir_path}/master-password"
> > +
> > +    only_if { node['glassfish']['version'][0] == '4' }
> > +    only_if { ::File.exists?(source_file) }
> > +    not_if { ::File.exists?(dest_file) }
> > +
> > +    FileUtils.cp(source_file, dest_file)
> > +    FileUtils.chown( new_resource.system_user, new_resource.system_group, dest_file)
>
> The above two lines should be wrapped in a block so that they execute
> during the run phase rather than the compile phase. It should look
> something like
>
> block do
>  FileUtils.cp(source_file, dest_file)
>  FileUtils.chown( new_resource.system_user, new_resource.system_group, dest_file)   end
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/realityforge/chef-glassfish/pull/21/files#r8916296>
> .
>