clean up resources
This commit is contained in:
Родитель
77e29b76d9
Коммит
534530fc23
|
@ -28,8 +28,8 @@ property :settings, Hash
|
|||
property :system, [true, false]
|
||||
|
||||
action :run do
|
||||
if new_resource.read_only
|
||||
new_resource.option = 'read'
|
||||
if read_only
|
||||
option = 'read'
|
||||
end
|
||||
settings.each do |setting, value|
|
||||
execute BASE_COMMAND do
|
||||
|
|
|
@ -25,7 +25,7 @@ BASE_COMMAND = '/usr/bin/pmset'.freeze
|
|||
property :settings, Hash
|
||||
|
||||
action :run do
|
||||
new_resource.settings.each do |setting, value|
|
||||
settings.each do |setting, value|
|
||||
execute BASE_COMMAND do
|
||||
command "#{BASE_COMMAND} #{setting} #{value}"
|
||||
end
|
||||
|
|
|
@ -27,13 +27,21 @@ property :settings, Hash
|
|||
property :system_setting, [true, false], default: false
|
||||
|
||||
action :run do
|
||||
new_resource.settings.each do |flag, setting|
|
||||
settings.each do |flag, setting|
|
||||
execute BASE_COMMAND do
|
||||
command "#{BASE_COMMAND} -set#{flag} #{setting}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
action :verify do
|
||||
settings.each do |flag, _|
|
||||
execute BASE_COMMAND do
|
||||
command "#{BASE_COMMAND} -get#{flag}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Available key/value pairs to use with the systemsetup resource:
|
||||
|
||||
# date <mm:dd:yy>
|
||||
|
|
Загрузка…
Ссылка в новой задаче