summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2012-12-20 09:54:04 +0000
committerBenedikt Boehm <hollow@gentoo.org>2012-12-20 09:54:04 +0000
commit335424163ee8c1d32057bdd0f9c0c51257d44d2a (patch)
tree5b6de11eb537f559c21649d9574b9afab0f17243 /app-admin
parentfix #446734 (diff)
downloadgentoo-2-335424163ee8c1d32057bdd0f9c0c51257d44d2a.tar.gz
gentoo-2-335424163ee8c1d32057bdd0f9c0c51257d44d2a.tar.bz2
gentoo-2-335424163ee8c1d32057bdd0f9c0c51257d44d2a.zip
improve init script
(Portage version: 2.2.0_alpha147/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/chef/ChangeLog5
-rw-r--r--app-admin/chef/files/initd/chef-client27
2 files changed, 12 insertions, 20 deletions
diff --git a/app-admin/chef/ChangeLog b/app-admin/chef/ChangeLog
index 6c16bf610247..871f179770ae 100644
--- a/app-admin/chef/ChangeLog
+++ b/app-admin/chef/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for app-admin/chef
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/chef/ChangeLog,v 1.15 2012/12/18 14:43:22 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/chef/ChangeLog,v 1.16 2012/12/20 09:54:04 hollow Exp $
+
+ 20 Dec 2012; Benedikt Böhm <hollow@gentoo.org> files/initd/chef-client:
+ improve init script
18 Dec 2012; Benedikt Böhm <hollow@gentoo.org> chef-10.16.2.ebuild:
fix gem dependency issues
diff --git a/app-admin/chef/files/initd/chef-client b/app-admin/chef/files/initd/chef-client
index 0194561e905a..27a4d0dab17e 100644
--- a/app-admin/chef/files/initd/chef-client
+++ b/app-admin/chef/files/initd/chef-client
@@ -2,29 +2,18 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-depend() {
- need net
-}
-
-CHEF_CLIENT_BINARY=${CHEF_CLIENT_BINARY:-/usr/bin/chef-client}
-CHEF_CLIENT_PIDFILE=${CHEF_CLIENT_PIDFILE:-/var/run/chef/client.pid}
CONFIGFILE=${CONFIGFILE:-/etc/chef/client.rb}
INTERVAL=${INTERVAL:-1800}
SPLAY=${SPLAY:-20}
-start() {
- ebegin "Starting Chef client"
- start-stop-daemon --start \
- --pidfile ${CHEF_CLIENT_PIDFILE} \
- --exec ${CHEF_CLIENT_BINARY} \
- -- \
- -d -c ${CONFIGFILE} -i ${INTERVAL} -s ${SPLAY} \
- ${CHEF_CLIENT_OPTS}
- eend $?
+command=${CHEF_CLIENT_BINARY:-/usr/bin/chef-client}
+command_args="-d -c ${CONFIGFILE} -i ${INTERVAL} -s ${SPLAY} ${CHEF_CLIENT_OPTS}"
+pidfile=${CHEF_CLIENT_PIDFILE:-/var/run/chef/client.pid}
+
+depend() {
+ need net
}
-stop() {
- ebegin "Shutting down Chef client"
- start-stop-daemon --stop --pidfile ${CHEF_CLIENT_PIDFILE}
- eend $?
+start_pre() {
+ checkpath -q -d -m 0755 -o chef:chef /var/run/chef
}