Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 7aac75344e1ec6fec7fa08a6e54ca624 > files > 2

puppet-4.2.1-4.4.mga6.src.rpm

From c36f1e9e6c61dad042cd5827f816a570bc71cc6b Mon Sep 17 00:00:00 2001
From: Ian Wienand <iwienand@redhat.com>
Date: Fri, 4 Dec 2015 13:14:38 +1100
Subject: [PATCH] (PUP-5577) Don't require /run/systemd/system for systemd

7fe61647f23650fc4c93cd6b54c654a20ff7c9f9 added this check; here we
restrict it to Debian because it means systemd is not detected if
running puppet within a chroot environment where this is not yet
mounted.
---
 lib/puppet/provider/service/systemd.rb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/puppet/provider/service/systemd.rb b/lib/puppet/provider/service/systemd.rb
index 7521852..1862d95 100644
--- a/lib/puppet/provider/service/systemd.rb
+++ b/lib/puppet/provider/service/systemd.rb
@@ -5,7 +5,14 @@ Puppet::Type.type(:service).provide :systemd, :parent => :base do
 
   commands :systemctl => "systemctl"
 
-  confine :exists => "/run/systemd/system"
+  if Facter.value(:osfamily).downcase == 'debian'
+    # With multiple init systems on Debian, it is possible to have
+    # pieces of systemd around (e.g. systemctl) but not really be
+    # using systemd.  We do not do this on other platforms as it can
+    # cause issues when running in a chroot without /run mounted
+    # (PUP-5577)
+    confine :exists => "/run/systemd/system"
+  end
 
   defaultfor :osfamily => [:archlinux]
   defaultfor :osfamily => :redhat, :operatingsystemmajrelease => "7"
-- 
2.7.4