summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-07-19 18:50:20 +0000
committerLuke Kanies <luke@madstop.com>2005-07-19 18:50:20 +0000
commit0e94644b6e2ccbd0a3d52cb210bcfced39321194 (patch)
treea1694319be4666cb3ccd1b1fb3566ad86f1d56a6 /lib
parent3a67efa703f2e1db49d7a213e56a72cc5885fbba (diff)
downloadpuppet-0e94644b6e2ccbd0a3d52cb210bcfced39321194.tar.gz
puppet-0e94644b6e2ccbd0a3d52cb210bcfced39321194.tar.xz
puppet-0e94644b6e2ccbd0a3d52cb210bcfced39321194.zip
moving setpath to parampath=, as a param method
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@423 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/type/service.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/puppet/type/service.rb b/lib/puppet/type/service.rb
index a824225fc..28e9275a6 100644
--- a/lib/puppet/type/service.rb
+++ b/lib/puppet/type/service.rb
@@ -118,10 +118,11 @@ module Puppet
def initialize(hash)
super
- if hash[:path]
- self.setpath(hash[:path])
- else
- raise "You must specify a search path for service %s" % self.name
+ unless @searchpaths.length >= 0
+ raise Puppet::Error(
+ "You must specify a valid search path for service %s" %
+ self.name
+ )
end
end
@@ -142,7 +143,7 @@ module Puppet
raise "Could not find init script for '%s'" % name
end
- def setpath(ary)
+ def parampath=(ary)
# verify each of the paths exists
@searchpaths = ary.find_all { |dir|
FileTest.directory?(dir)