summaryrefslogtreecommitdiff
path: root/lib/chef/provider/package/solaris.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-08-29 15:47:58 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2014-09-08 11:10:05 -0700
commit342201b4e3ad90a0a5ddc62a1e4db76e95aea7e2 (patch)
treed4a2d6d86df86eab92532d67c732d03e14665bc7 /lib/chef/provider/package/solaris.rb
parentd6f6928fd1097709189cd78689e89032d4c9318d (diff)
downloadchef-342201b4e3ad90a0a5ddc62a1e4db76e95aea7e2.tar.gz
fix shell_out/run_command usage
- run_command is deprecated - shell_out! should be used for internal APIs (enable/disable/status) - shell_out_with_systems_locale! should be used for start/stop/restart/reload cases (users will want their software running in their systems locale not our forced en_US.UTF-8 locale)
Diffstat (limited to 'lib/chef/provider/package/solaris.rb')
-rw-r--r--lib/chef/provider/package/solaris.rb16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/chef/provider/package/solaris.rb b/lib/chef/provider/package/solaris.rb
index 0f45b61e18..19f844b66a 100644
--- a/lib/chef/provider/package/solaris.rb
+++ b/lib/chef/provider/package/solaris.rb
@@ -112,9 +112,7 @@ class Chef
else
command = "pkgadd -n -d #{@new_resource.source} all"
end
- run_command_with_systems_locale(
- :command => command
- )
+ shell_out!(command)
Chef::Log.debug("#{@new_resource} installed version #{@new_resource.version} from: #{@new_resource.source}")
else
if ::File.directory?(@new_resource.source) # CHEF-4469
@@ -122,23 +120,17 @@ class Chef
else
command = "pkgadd -n#{expand_options(@new_resource.options)} -d #{@new_resource.source} all"
end
- run_command_with_systems_locale(
- :command => command
- )
+ shell_out!(command)
Chef::Log.debug("#{@new_resource} installed version #{@new_resource.version} from: #{@new_resource.source}")
end
end
def remove_package(name, version)
if @new_resource.options.nil?
- run_command_with_systems_locale(
- :command => "pkgrm -n #{name}"
- )
+ shell_out!( "pkgrm -n #{name}" )
Chef::Log.debug("#{@new_resource} removed version #{@new_resource.version}")
else
- run_command_with_systems_locale(
- :command => "pkgrm -n#{expand_options(@new_resource.options)} #{name}"
- )
+ shell_out!( "pkgrm -n#{expand_options(@new_resource.options)} #{name}" )
Chef::Log.debug("#{@new_resource} removed version #{@new_resource.version}")
end
end