diff --git a/lib/puppet/provider/service/debian.rb b/lib/puppet/provider/service/debian.rb index 233242a1c..e54fb13df 100755 --- a/lib/puppet/provider/service/debian.rb +++ b/lib/puppet/provider/service/debian.rb @@ -1,35 +1,37 @@ # Manage debian services. Start/stop is the same as InitSvc, but enable/disable # is special. Puppet::Type.type(:service).provide :debian, :parent => :init do desc "Debian's form of ``init``-style management. The only difference is that this supports service enabling and disabling via ``update-rc.d``." commands :update => "/usr/sbin/update-rc.d" defaultfor :operatingsystem => :debian def self.defpath superclass.defpath end # Remove the symlinks def disable update "-f", @resource[:name], "remove" + update @resource[:name], "stop 1 2 3 4 5 6 ." end def enabled? output = update "-n", "-f", @resource[:name], "remove" # If it's enabled, then it will print output showing removal of # links. if output =~ /etc\/rc[\dS].d|not installed/ return :true else return :false end end def enable + update "-f", @resource[:name], "remove" update @resource[:name], "defaults" end end