Skip to content

Commit 3ce4097

Browse files
committed
Set systemd as default for Raspbian 12
1 parent 73e253a commit 3ce4097

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/puppet/provider/service/systemd.rb

Lines changed: 1 addition & 0 deletions
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.family' => :raspbian, 'os.release.major' => ["12"]
3435

3536
def self.instances
3637
i = []

spec/unit/provider/service/systemd_spec.rb

Lines changed: 7 additions & 0 deletions
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(:osfamily).and_return(:debian)
176+
allow(Facter).to receive(:value).with(:operatingsystem).and_return(:raspbian)
177+
allow(Facter).to receive(:value).with(:operatingsystemmajrelease).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)