diff --git a/shared/lib/puppet/provider/configure/action.rb b/shared/lib/puppet/provider/configure/action.rb index e1e718d..ca0a592 100644 --- a/shared/lib/puppet/provider/configure/action.rb +++ b/shared/lib/puppet/provider/configure/action.rb @@ -2,10 +2,8 @@ Puppet::Type.type(:configure).provide(:action) do desc "Configure a program to install" def create - command = %{bash -c "env ; sleep 10 ; cd #{@resource[:build_path]} && #{@resource[:preconfigure].gsub('"', '\\"')} #{path} ./configure --prefix=#{@resource[:install_path]} #{@resource[:options]}"}.tap { |o| p o } + command = %{bash -c "cd #{@resource[:build_path]} && #{@resource[:preconfigure].gsub('"', '\\"')} #{path} ./configure --prefix=#{@resource[:install_path]} #{@resource[:options]}"}.tap { |o| p o } system command - p $? - puts command raise StandardError.new("Could not configure") if $?.exitstatus != 0 end @@ -14,7 +12,7 @@ Puppet::Type.type(:configure).provide(:action) do end def exists? - return true if unless? + return unless? if unless? != nil File.file?(config_status) end diff --git a/shared/lib/puppet/provider/download_and_unpack/action.rb b/shared/lib/puppet/provider/download_and_unpack/action.rb index 4785a4e..9470d95 100644 --- a/shared/lib/puppet/provider/download_and_unpack/action.rb +++ b/shared/lib/puppet/provider/download_and_unpack/action.rb @@ -15,7 +15,7 @@ Puppet::Type.type(:download_and_unpack).provide(:action) do end def exists? - return true if unless? + return unless? if unless? != nil File.directory?(File.join(@resource[:src_path], target_dir)) end diff --git a/shared/lib/puppet/provider/make_and_install/action.rb b/shared/lib/puppet/provider/make_and_install/action.rb index f871b20..79025a7 100644 --- a/shared/lib/puppet/provider/make_and_install/action.rb +++ b/shared/lib/puppet/provider/make_and_install/action.rb @@ -17,7 +17,7 @@ Puppet::Type.type(:make_and_install).provide(:action) do end def exists? - return true if unless? + return unless? if unless? != nil File.directory?(@resource[:install_path]) && File.symlink?(symlink_path) end