Skip to content

Commit

Permalink
Set systemd as default for Raspbian 12
Browse files Browse the repository at this point in the history
  • Loading branch information
jaevans committed Nov 22, 2023
1 parent 4e6aa1f commit 74a2eb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/puppet/provider/service/systemd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
defaultfor :operatingsystem => :ubuntu
notdefaultfor :operatingsystem => :ubuntu, :operatingsystemmajrelease => ["10.04", "12.04", "14.04", "14.10"] # These are using upstart
defaultfor :operatingsystem => :cumuluslinux, :operatingsystemmajrelease => ["3", "4"]
defaultfor :operatingsystem => :raspbian, :operatingsystemmajrelease => ["12"]

def self.instances
i = []
Expand Down
7 changes: 7 additions & 0 deletions spec/unit/provider/service/systemd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@
end
end

it "should be the default provider on raspbian12" do
allow(Facter).to receive(:value).with(:osfamily).and_return(:debian)
allow(Facter).to receive(:value).with(:operatingsystem).and_return(:raspbian)
allow(Facter).to receive(:value).with(:operatingsystemmajrelease).and_return("12")
expect(provider_class).to be_default
end

[:enabled?, :daemon_reload?, :enable, :disable, :start, :stop, :status, :restart].each do |method|
it "should have a #{method} method" do
expect(provider).to respond_to(method)
Expand Down

0 comments on commit 74a2eb5

Please sign in to comment.