fix name resource
This commit is contained in:
Родитель
a4aaf4845f
Коммит
c11c9ebe4f
|
@ -6,11 +6,16 @@ SMB_SERVER_PLIST = '/Library/Preferences/SystemConfiguration/com.apple.smb.serve
|
|||
|
||||
property :name, String, name_property: true
|
||||
|
||||
# We cannot set the LocalHostName here because it does not conform to
|
||||
# the DNS standards outlined in RFC 1034 (section 3.5)
|
||||
|
||||
action :run do
|
||||
execute BASE_COMMAND do
|
||||
command "#{BASE_COMMAND} --set ComputerName #{new_resource.name}"
|
||||
command "#{BASE_COMMAND} --set LocalHostName #{new_resource.name}.local"
|
||||
command "#{BASE_COMMAND} --set HostName #{new_resource.name}"
|
||||
command "#{BASE_COMMAND} --set HostName '#{new_resource.name}'"
|
||||
end
|
||||
|
||||
execute BASE_COMMAND do
|
||||
command "#{BASE_COMMAND} --set ComputerName '#{new_resource.name}'"
|
||||
end
|
||||
|
||||
defaults SMB_SERVER_PLIST do
|
||||
|
|
Загрузка…
Ссылка в новой задаче