Commit 5743d653 authored by Tim Smith's avatar Tim Smith
Browse files

Remove support for Gentoo



We have no way to actually test this and there is no Chef omnibus package for Gentoo
Signed-off-by: Tim Smith's avatarTim Smith <tsmith@chef.io>
parent 0dca4c92
......@@ -2,7 +2,6 @@
[![Build Status](https://travis-ci.org/chef-cookbooks/runit.svg?branch=master)](https://travis-ci.org/chef-cookbooks/runit) [![Cookbook Version](https://img.shields.io/cookbook/v/runit.svg)](https://supermarket.chef.io/cookbooks/runit)
Installs runit and provides the `runit_service` service resource for managing processes (services) under runit.
This cookbook does not use runit to replace system init, nor are there plans to do so.
......@@ -54,8 +53,6 @@ On RHEL-family systems, it will install the runit RPM using [Ian Meyer's Package
On Debian family systems, the runit packages are maintained by the runit author, Gerrit Pape, and the recipe will use that for installation.
On Gentoo, the runit ebuild package is installed.
## Resource/Provider
This cookbook has a resource, `runit_service`, for managing services under runit. This service subclasses the Chef `service` resource.
......
......@@ -47,16 +47,4 @@ when 'rhel', 'fedora'
default['runit']['start'] = '/etc/init.d/runit-start start'
default['runit']['stop'] = '/etc/init.d/runit-start stop'
default['runit']['reload'] = '/etc/init.d/runit-start reload'
when 'gentoo'
default['runit']['sv_bin'] = '/usr/bin/sv'
default['runit']['chpst_bin'] = '/usr/bin/chpst'
default['runit']['service_dir'] = '/var/service'
default['runit']['sv_dir'] = '/etc/sv'
default['runit']['lsb_init_dir'] = '/etc/init.d'
default['runit']['executable'] = '/sbin/runit'
default['runit']['start'] = '/etc/init.d/runit-start start'
default['runit']['stop'] = '/etc/init.d/runit-start stop'
default['runit']['reload'] = '/etc/init.d/runit-start reload'
end
......@@ -45,23 +45,9 @@ when 'rhel', 'fedora'
only_if { node['platform_version'].to_i == 7 }
end
when 'debian', 'gentoo'
if platform?('gentoo')
template '/etc/init.d/runit-start' do
source 'runit-start.sh.erb'
mode '0755'
end
service 'runit-start' do
action :nothing
end
end
when 'debian'
package 'runit' do
action :install
response_file 'runit.seed' if platform?('ubuntu', 'debian')
notifies :run, 'execute[start-runsvdir]', :immediately if platform?('gentoo')
notifies :enable, 'service[runit-start]' if platform?('gentoo')
response_file 'runit.seed'
end
end
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
after net
}
start() {
ebegin "Starting runsvdir"
start-stop-daemon --start --exec /usr/bin/runsvdir \
--background --make-pidfile \
--pidfile /var/run/runsvdir.pid -- <%= node.runit.sv_dir %>
eend $?
}
stop() {
local ret1 ret2
ebegin "Stopping runsvdir"
start-stop-daemon --stop --oknodo --pidfile /var/run/runsvdir.pid
ret1=$?
eend ${ret1}
ebegin "Stopping services and logging"
sv shutdown -w 10 <%= node.runit.sv_dir %>/*
ret2=$?
eend ${ret2}
return $((ret1+ret2))
}
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