Commit fdcf0966 authored by Tim Smith's avatar Tim Smith Committed by Cameron Johnston
Browse files

Remove support for EoL platform versions

parent e573f460
start on runlevel-2
start on runlevel-3
start on runlevel-4
start on runlevel-5
stop on shutdown
respawn /usr/sbin/runsvdir-start
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn
exec /usr/sbin/runsvdir-start
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn
exec /usr/sbin/runsvdir-start
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn
exec /usr/sbin/runsvdir-start
......@@ -2,7 +2,7 @@
# Cookbook Name:: runit
# Recipe:: default
#
# Copyright 2008-2010, Chef Software, Inc.
# Copyright 2008-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
......@@ -22,17 +22,7 @@ service 'runit' do
end
execute 'start-runsvdir' do
command value_for_platform(
'debian' => { 'default' => 'runsvdir-start' },
'ubuntu' => { 'default' => 'start runsvdir' },
'gentoo' => { 'default' => '/etc/init.d/runit-start start' }
)
action :nothing
end
execute 'runit-hup-init' do
command 'telinit q'
only_if 'grep ^SV /etc/inittab'
command '/etc/init.d/runit-start start'
action :nothing
end
......@@ -43,9 +33,9 @@ when 'rhel', 'fedora'
unless node['runit']['prefer_local_yum']
include_recipe 'yum-epel' if node['platform_version'].to_i < 7
packagecloud_repo 'imeyer/runit'
packagecloud_repo 'imeyer/runit'
end
package 'runit'
service 'runsvdir-start' do
......@@ -69,28 +59,7 @@ when 'debian', 'gentoo'
package 'runit' do
action :install
response_file 'runit.seed' if platform?('ubuntu', 'debian')
notifies value_for_platform(
'debian' => { '4.0' => :run, 'default' => :nothing },
'ubuntu' => {
'default' => :nothing,
'9.04' => :run,
'8.10' => :run,
'8.04' => :run },
'gentoo' => { 'default' => :run }
), 'execute[start-runsvdir]', :immediately
notifies value_for_platform(
'debian' => { 'squeeze/sid' => :run, 'default' => :nothing },
'default' => :nothing
), 'execute[runit-hup-init]', :immediately
notifies :run, 'execute[start-runsvdir]', :immediately if platform?('gentoo')
notifies :enable, 'service[runit-start]' if platform?('gentoo')
end
if node['platform'] =~ /ubuntu/i && node['platform_version'].to_f <= 8.04
cookbook_file '/etc/event.d/runsvdir' do
source 'runsvdir'
mode 0644
notifies :run, 'execute[start-runsvdir]', :immediately
only_if { ::File.directory?('/etc/event.d') }
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment