Skip to content

Commit 2dc127f

Browse files
committed
Set systemd as default for Raspbian 12
1 parent f3ffd8a commit 2dc127f

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
@@ -28,6 +28,7 @@
2828
defaultfor 'os.name' => :ubuntu
2929
notdefaultfor 'os.name' => :ubuntu, 'os.release.major' => ["10.04", "12.04", "14.04", "14.10"] # These are using upstart
3030
defaultfor 'os.name' => :cumuluslinux, 'os.release.major' => ["3", "4"]
31+
defaultfor 'os.family' => :raspbian, 'os.release.major' => ["12"]
3132

3233
def self.instances
3334
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
[: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)