summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-25 20:39:39 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-25 20:39:39 +0000
commitd1458bd64fd89b85c876ff557e331f0f551c8e57 (patch)
treeff86dc25ceeb9abb843c766db7d27b8e3eb0b3f2
parent1883b8fa805adb8ea6c133a8df97eb2a53544837 (diff)
downloadpuppet-d1458bd64fd89b85c876ff557e331f0f551c8e57.tar.gz
puppet-d1458bd64fd89b85c876ff557e331f0f551c8e57.tar.xz
puppet-d1458bd64fd89b85c876ff557e331f0f551c8e57.zip
Adding a warning for when no properties are specified on services
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2536 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--CHANGELOG5
-rw-r--r--lib/puppet/type/service.rb4
2 files changed, 9 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 426de19ed..db9ef9c12 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,8 @@
+ Added some warnings and logs to the service type so
+ users will be encouraged to specify either "ensure"
+ or "enabled" and added debugging to indicate why
+ restarting is skipped when it is.
+
Changed the location of the classes.txt to the state
directory.
diff --git a/lib/puppet/type/service.rb b/lib/puppet/type/service.rb
index 354623907..c582b17ee 100644
--- a/lib/puppet/type/service.rb
+++ b/lib/puppet/type/service.rb
@@ -307,6 +307,10 @@ module Puppet
if self.respond_to?(:configchk)
self.configchk
end
+
+ unless @parameters.include?(:ensure) or @parameters.include?(:enable)
+ warning "No properties specified; 'enable' or 'ensure' should be specified"
+ end
end
# Basically just a synonym for restarting. Used to respond