This commit is contained in:
Eric Hanko 2017-07-17 15:58:29 -07:00
Родитель a4aaf4845f
Коммит c11c9ebe4f
1 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -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