Make timezone configuration actually work
authorTom Hughes <tom@compton.nu>
Fri, 8 Jun 2018 14:34:26 +0000 (15:34 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 8 Jun 2018 14:34:26 +0000 (15:34 +0100)
cookbooks/ntp/recipes/default.rb

index 3cefe3c..7be4ab4 100644 (file)
@@ -32,11 +32,10 @@ execute "dpkg-reconfigure-tzdata" do
   group "root"
 end
 
-file "/etc/timezone" do
+link "/etc/localtime" do
+  to "/usr/share/zoneinfo/#{node[:tz]}"
   owner "root"
   group "root"
-  mode 0o644
-  content "#{node[:tz]}\n"
   notifies :run, "execute[dpkg-reconfigure-tzdata]", :immediately
 end