Permalink
Browse files

ntp v1.0.1, use attribute for service name

* Support scientific linux
* Use service name attribute in resource (fixes EL derivatives)
  • Loading branch information...
1 parent 52d1341 commit 5c8cbac11baf7100a94b9e138e069e2c1d3c6393 @jtimberman jtimberman committed Jul 18, 2011
Showing with 17 additions and 8 deletions.
  1. +8 −0 ntp/README.md
  2. +1 −1 ntp/attributes/default.rb
  3. +2 −2 ntp/metadata.rb
  4. +6 −5 ntp/recipes/default.rb
View
@@ -3,6 +3,14 @@ DESCRIPTION
Installs and configures ntp, optionally set up a local NTP server.
+CHANGES
+=======
+
+## v1.0.1:
+
+* Support scientific linux
+* Use service name attribute in resource (fixes EL derivatives)
+
REQUIREMENTS
============
@@ -1,7 +1,7 @@
case platform
when "ubuntu","debian"
default[:ntp][:service] = "ntp"
-when "redhat","centos","fedora"
+when "redhat","centos","fedora","scientific"
default[:ntp][:service] = "ntpd"
end
View
@@ -3,11 +3,11 @@
license "Apache 2.0"
description "Installs and configures ntp as a client or server"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "1.0.0"
+version "1.0.1"
recipe "ntp", "Installs and configures ntp either as a server or client"
-%w{ ubuntu debian redhat centos fedora }.each do |os|
+%w{ ubuntu debian redhat centos fedora scientific }.each do |os|
supports os
end
@@ -28,14 +28,15 @@
action :install
end
-service node[:ntp][:service] do
- action :start
-end
-
template "/etc/ntp.conf" do
source "ntp.conf.erb"
owner "root"
group "root"
mode 0644
- notifies :restart, resources(:service => node[:ntp][:service])
+ notifies :restart, "service[ntp]"
+end
+
+service "ntp" do
+ service_name node[:ntp][:service]
+ action [:enable, :start]
end

0 comments on commit 5c8cbac

Please sign in to comment.