From d1458bd64fd89b85c876ff557e331f0f551c8e57 Mon Sep 17 00:00:00 2001 From: luke Date: Fri, 25 May 2007 20:39:39 +0000 Subject: 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 --- CHANGELOG | 5 +++++ lib/puppet/type/service.rb | 4 ++++ 2 files changed, 9 insertions(+) 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 -- cgit