bab9bb6b69
Create new directories: ceph config config-files filesystem kernel kernel/kernel-modules ldap logging strorage-drivers tools utilities virt Retire directories: connectivity core devtools support extended Delete two packages: tgt irqbalance Relocated packages: base/ dhcp initscripts libevent lighttpd linuxptp memcached net-snmp novnc ntp openssh pam procps sanlock shadow sudo systemd util-linux vim watchdog ceph/ python-cephclient config/ facter puppet-4.8.2 puppet-modules filesystem/ e2fsprogs nfs-utils nfscheck kernel/ kernel-std kernel-rt kernel/kernel-modules/ mlnx-ofa_kernel ldap/ nss-pam-ldapd openldap logging/ syslog-ng logrotate networking/ lldpd iproute mellanox python-ryu mlx4-config python/ python-2.7.5 python-django python-gunicorn python-setuptools python-smartpm python-voluptuous security/ shim-signed shim-unsigned tboot strorage-drivers/ python-3parclient python-lefthandclient virt/ cloud-init libvirt libvirt-python qemu tools/ storage-topology vm-topology utilities/ tis-extensions namespace-utils nova-utils update-motd Change-Id: I37ade764d873c701b35eac5881eb40412ba64a86 Story: 2002801 Task: 22687 Signed-off-by: Scott Little <scott.little@windriver.com>
62 lines
2.2 KiB
Diff
62 lines
2.2 KiB
Diff
From 9b6966aa6b2b3c3a6876db1e2788d93f90899fa8 Mon Sep 17 00:00:00 2001
|
|
From: Al Bailey <Al.Bailey@windriver.com>
|
|
Date: Wed, 4 Oct 2017 14:31:23 -0500
|
|
Subject: [PATCH] Block enabling of services
|
|
|
|
---
|
|
lib/puppet/provider/service/redhat.rb | 7 ++++---
|
|
lib/puppet/provider/service/systemd.rb | 4 +++-
|
|
2 files changed, 7 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/lib/puppet/provider/service/redhat.rb b/lib/puppet/provider/service/redhat.rb
|
|
index 4f3f9b8..fe3723f 100644
|
|
--- a/lib/puppet/provider/service/redhat.rb
|
|
+++ b/lib/puppet/provider/service/redhat.rb
|
|
@@ -7,6 +7,7 @@ Puppet::Type.type(:service).provide :redhat, :parent => :init, :source => :init
|
|
"
|
|
|
|
commands :chkconfig => "/sbin/chkconfig", :service => "/sbin/service"
|
|
+ commands :noop => "/bin/true"
|
|
|
|
defaultfor :osfamily => :redhat
|
|
defaultfor :osfamily => :suse, :operatingsystemmajrelease => ["10", "11"]
|
|
@@ -42,10 +43,10 @@ Puppet::Type.type(:service).provide :redhat, :parent => :init, :source => :init
|
|
# Don't support them specifying runlevels; always use the runlevels
|
|
# in the init scripts.
|
|
def enable
|
|
- chkconfig("--add", @resource[:name])
|
|
- chkconfig(@resource[:name], :on)
|
|
+ # Do not enable services
|
|
+ noop(@resource[:name])
|
|
rescue Puppet::ExecutionFailure => detail
|
|
- raise Puppet::Error, "Could not enable #{self.name}: #{detail}", detail.backtrace
|
|
+ raise Puppet::Error, "Could not enable #{self.name}", detail.backtrace
|
|
end
|
|
|
|
def initscript
|
|
diff --git a/lib/puppet/provider/service/systemd.rb b/lib/puppet/provider/service/systemd.rb
|
|
index a673550..a4deed4 100644
|
|
--- a/lib/puppet/provider/service/systemd.rb
|
|
+++ b/lib/puppet/provider/service/systemd.rb
|
|
@@ -8,6 +8,7 @@ Puppet::Type.type(:service).provide :systemd, :parent => :base do
|
|
providing the proper suffix."
|
|
|
|
commands :systemctl => "systemctl"
|
|
+ commands :noop => "/bin/true"
|
|
|
|
if Facter.value(:osfamily).downcase == 'debian'
|
|
# With multiple init systems on Debian, it is possible to have
|
|
@@ -118,7 +119,8 @@ Puppet::Type.type(:service).provide :systemd, :parent => :base do
|
|
|
|
def enable
|
|
self.unmask
|
|
- systemctl_change_enable(:enable)
|
|
+ #systemctl_change_enable(:enable)
|
|
+ [command(:noop), @resource[:name]]
|
|
end
|
|
|
|
def mask
|
|
--
|
|
1.8.3.1
|
|
|