Skip to content

Commit

Permalink
with Fedora's and Archlinux usr move the location of systemctl has ch…
Browse files Browse the repository at this point in the history
…anged. This will make sure that systemctl will be found
  • Loading branch information
aboe76 committed Sep 17, 2012
1 parent a1bb0dd commit ee8bf3d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/puppet/provider/service/systemd.rb
@@ -1,11 +1,17 @@
# Manage systemd services using /bin/systemctl

Puppet::Type.type(:service).provide :systemd, :parent => :base do
desc "Manages `systemd` services using `/bin/systemctl`."

commands :systemctl => "/bin/systemctl"
desc "Manages `systemd` services using `/bin/systemctl` or `/usr/bin/systemctl."

if File.exists?(/bin/systemctl)
commands :systemctl => "/bin/systemctl"
else
if File.exists?(/usr/bin/systemctl)
commands :systemctl => "/usr/bin/systemctl"
end
end

#defaultfor :osfamily => [:redhat, :suse]
#defaultfor :osfamily => [:redhat, :suse :archlinux]

def self.instances
i = []
Expand Down

0 comments on commit ee8bf3d

Please sign in to comment.