Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
puppet
3.8.5-systemd_default_service_provider.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3.8.5-systemd_default_service_provider.patch of Package puppet
From bdd0dfdda47032a269b42a53c864fe91856eaedd Mon Sep 17 00:00:00 2001 From: Rob Braden <bradejr@puppetlabs.com> Date: Wed, 24 Sep 2014 11:41:51 -0700 Subject: [PATCH] (pup-3338) Make systemd the default service provider for SLES 12 OpenSuSE >= 12 and SLES 12 use systemd as the default service management framework. This updates puppet to use the systemd provider by default on OpenSuSE 12 and 13 and SLES 12 --- lib/puppet/provider/service/systemd.rb | 1 + spec/unit/provider/service/systemd_spec.rb | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) Index: puppet-3.8.5/lib/puppet/provider/service/systemd.rb =================================================================== --- puppet-3.8.5.orig/lib/puppet/provider/service/systemd.rb +++ puppet-3.8.5/lib/puppet/provider/service/systemd.rb @@ -8,6 +8,7 @@ Puppet::Type.type(:service).provide :sys defaultfor :osfamily => [:archlinux] defaultfor :osfamily => :redhat, :operatingsystemmajrelease => "7" defaultfor :osfamily => :redhat, :operatingsystem => :fedora, :operatingsystemmajrelease => ["17", "18", "19", "20", "21"] + defaultfor :osfamily => :suse, :operatingsystemmajrelease => ["12", "13"] def self.instances i = [] Index: puppet-3.8.5/spec/unit/provider/service/systemd_spec.rb =================================================================== --- puppet-3.8.5.orig/spec/unit/provider/service/systemd_spec.rb +++ puppet-3.8.5/spec/unit/provider/service/systemd_spec.rb @@ -52,6 +52,24 @@ describe Puppet::Type.type(:service).pro end end + it "should be the default provider on sles12" do + Facter.expects(:value).with(:osfamily).at_least_once.returns(:suse) + Facter.expects(:value).with(:operatingsystemmajrelease).returns("12") + described_class.default?.should be_true + end + + it "should be the default provider on opensuse13" do + Facter.expects(:value).with(:osfamily).at_least_once.returns(:suse) + Facter.expects(:value).with(:operatingsystemmajrelease).returns("13") + described_class.default?.should be_true + end + + it "should not be the default provider on sles11" do + Facter.expects(:value).with(:osfamily).at_least_once.returns(:suse) + Facter.expects(:value).with(:operatingsystemmajrelease).returns("11") + described_class.default?.should_not be_true + end + [:enabled?, :enable, :disable, :start, :stop, :status, :restart].each do |method| it "should have a #{method} method" do provider.should respond_to(method)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor