Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 498510
Collapse All | Expand All

(-)a/files/keystone.confd (-3 / +3 lines)
Lines 1-3 Link Here
1
CONFIG_FILE=/etc/keystone/keystone.conf
1
#KEYSTONE_CONF=/etc/keystone/keystone.conf
2
LOG_FILE=/var/log/keystone/keystone.log
2
#KEYSTONE_USER=keystone
3
PID_PATH=/var/run/keystone
3
KEYSTONE_ARGS="--logfile /var/log/keystone/keystone.log"
(-)a/files/keystone.initd (-50 / +10 lines)
Lines 1-56 Link Here
1
#!/sbin/runscript
1
#!/sbin/runscript
2
# Copyright 1999-2013 Gentoo Foundation
2
# Copyright 1999-2014 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header: /var/cvsroot/gentoo-x86/sys-auth/keystone/files/keystone.initd,v 1.3 2013/11/18 03:24:30 prometheanfire Exp $
4
# $Header: $
5
6
command=/usr/bin/keystone-all
7
command_args="${KEYSTONE_ARGS}"
8
pidfile=/var/run/keystone.pid
9
name="OpenStack Keystone"
10
description="Starts both the service and administrative APIs in a single process to provide catalog, authorization, and authentication services for OpenStack"
11
start_stop_daemon_args="--background --make-pidfile --user ${KEYSTONE_USER:-keystone}"
12
required_files="${KEYSTONE_CONF:-/etc/keystone/keystone.conf}"
5
13
6
depend() {
14
depend() {
7
	need net
15
	need net
8
}
16
}
9
10
BASENAME=$(echo $SVCNAME | cut -d '-' -f 1)
11
12
checkconfig() {
13
	if [ ! -r /etc/conf.d/$BASENAME ]; then
14
		eerror "No keystone service confd file found: /etc/conf.d/$BASENAME)"
15
		return 1
16
	fi
17
	. /etc/conf.d/$BASENAME
18
19
	if [ ! -r ${CONFIG_FILE} ]; then
20
		eerror "No keystone config file found: ${CONFIG_FILE})"
21
		return 1
22
	fi
23
24
	return 0
25
}
26
27
28
start() {
29
	checkconfig || return $?
30
	. /etc/conf.d/$BASENAME
31
32
    if [ ! -d ${PID_PATH} ]; then
33
        mkdir ${PID_PATH}
34
    fi
35
	
36
	ebegin "Starting ${SVCNAME}"
37
	
38
	start-stop-daemon --start --quiet --make-pidfile --pidfile "${PID_PATH}/${SVCNAME}.pid" --exec /usr/bin/${SVCNAME}-all --background -- --config-file=${CONFIG_FILE} --log-file=${LOG_FILE}
39
	
40
	eend $? "Failed to start ${SVCNAME}"
41
}
42
43
stop() {
44
	checkconfig || return $?
45
	. /etc/conf.d/$BASENAME
46
	
47
	ebegin "Stopping ${SVCNAME}"
48
	
49
	start-stop-daemon --stop --pidfile "${PID_PATH}/${SVCNAME}.pid" \
50
					  --exec /usr/bin/${SVCNAME}-all
51
	eend $? "Failed to stop ${SVCNAME}"
52
}
53
54
#restart() {
55
#
56
#}
(-)a/keystone-2013.2.9999.ebuild (-3 / +2 lines)
Lines 100-113 python_install() { Link Here
100
	newinitd "${FILESDIR}/keystone.initd" keystone
100
	newinitd "${FILESDIR}/keystone.initd" keystone
101
101
102
	diropts -m 0750
102
	diropts -m 0750
103
	dodir /var/run/keystone /var/log/keystone /etc/keystone
103
	keepdir /etc/keystone /var/log/keystone
104
	keepdir /etc/keystone
105
	insinto /etc/keystone
104
	insinto /etc/keystone
106
	doins etc/keystone.conf.sample etc/logging.conf.sample
105
	doins etc/keystone.conf.sample etc/logging.conf.sample
107
	doins etc/default_catalog.templates etc/policy.json
106
	doins etc/default_catalog.templates etc/policy.json
108
	doins etc/policy.v3cloudsample.json etc/keystone-paste.ini
107
	doins etc/policy.v3cloudsample.json etc/keystone-paste.ini
109
108
110
	fowners keystone:keystone /var/run/keystone /var/log/keystone /etc/keystone
109
	fowners keystone:keystone /etc/keystone /var/log/keystone
111
}
110
}
112
111
113
pkg_postinst() {
112
pkg_postinst() {

Return to bug 498510