Skip to content

Commit

Permalink
Merge pull request #9477 from joshcooper/systemd-for-raspbian
Browse files Browse the repository at this point in the history
(PUP-11949) Set systemd as default for Raspbian 12
  • Loading branch information
mhashizume committed Sep 6, 2024
2 parents 80e9ccc + ef36b7e commit dc0e3ba
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 @@ -31,6 +31,7 @@
defaultfor 'os.name' => :ubuntu
notdefaultfor 'os.name' => :ubuntu, 'os.release.major' => ["10.04", "12.04", "14.04", "14.10"] # These are using upstart
defaultfor 'os.name' => :cumuluslinux, 'os.release.major' => %w[3 4]
defaultfor 'os.name' => :raspbian, 'os.release.major' => %w[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('os.family').and_return(:debian)
allow(Facter).to receive(:value).with('os.name').and_return(:raspbian)
allow(Facter).to receive(:value).with('os.release.major').and_return("12")
expect(provider_class).to be_default
end

%i[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 dc0e3ba

Please sign in to comment.