Skip to content

Commit dc0e3ba

Browse files
authored
Merge pull request #9477 from joshcooper/systemd-for-raspbian
(PUP-11949) Set systemd as default for Raspbian 12
2 parents 80e9ccc + ef36b7e commit dc0e3ba

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/puppet/provider/service/systemd.rb

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
defaultfor 'os.name' => :ubuntu
3232
notdefaultfor 'os.name' => :ubuntu, 'os.release.major' => ["10.04", "12.04", "14.04", "14.10"] # These are using upstart
3333
defaultfor 'os.name' => :cumuluslinux, 'os.release.major' => %w[3 4]
34+
defaultfor 'os.name' => :raspbian, 'os.release.major' => %w[12]
3435

3536
def self.instances
3637
i = []

spec/unit/provider/service/systemd_spec.rb

+7
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,13 @@
171171
end
172172
end
173173

174+
it "should be the default provider on raspbian12" do
175+
allow(Facter).to receive(:value).with('os.family').and_return(:debian)
176+
allow(Facter).to receive(:value).with('os.name').and_return(:raspbian)
177+
allow(Facter).to receive(:value).with('os.release.major').and_return("12")
178+
expect(provider_class).to be_default
179+
end
180+
174181
%i[enabled? daemon_reload? enable disable start stop status restart].each do |method|
175182
it "should have a #{method} method" do
176183
expect(provider).to respond_to(method)

0 commit comments

Comments
 (0)