summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Thode <prometheanfire@gentoo.org>2013-09-26 00:58:07 +0000
committerMatthew Thode <prometheanfire@gentoo.org>2013-09-26 00:58:07 +0000
commitea3c64128ebec65b4624d5cd3a0a1b9244bd3f51 (patch)
treed34b9251a0a4d21d02c16e18c04f1dedbb4258b5 /app-admin/glance
parentupdate of olso-config to 1.2.0 (diff)
downloadgentoo-2-ea3c64128ebec65b4624d5cd3a0a1b9244bd3f51.tar.gz
gentoo-2-ea3c64128ebec65b4624d5cd3a0a1b9244bd3f51.tar.bz2
gentoo-2-ea3c64128ebec65b4624d5cd3a0a1b9244bd3f51.zip
new initscript
(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 0x2471eb3e40ac5ac3)
Diffstat (limited to 'app-admin/glance')
-rw-r--r--app-admin/glance/ChangeLog6
-rw-r--r--app-admin/glance/files/glance-2.initd71
-rw-r--r--app-admin/glance/glance-2013.1.9999.ebuild4
-rw-r--r--app-admin/glance/glance-9999.ebuild4
4 files changed, 80 insertions, 5 deletions
diff --git a/app-admin/glance/ChangeLog b/app-admin/glance/ChangeLog
index a07a29c183ef..d8908b2f6490 100644
--- a/app-admin/glance/ChangeLog
+++ b/app-admin/glance/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-admin/glance
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/ChangeLog,v 1.18 2013/09/14 09:35:34 prometheanfire Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/ChangeLog,v 1.19 2013/09/26 00:58:07 prometheanfire Exp $
+
+ 26 Sep 2013; Matthew Thode <prometheanfire@gentoo.org> +files/glance-2.initd,
+ glance-2013.1.9999.ebuild, glance-9999.ebuild:
+ new initscript
*glance-2013.1.3-r2 (14 Sep 2013)
diff --git a/app-admin/glance/files/glance-2.initd b/app-admin/glance/files/glance-2.initd
new file mode 100644
index 000000000000..6898a00a015f
--- /dev/null
+++ b/app-admin/glance/files/glance-2.initd
@@ -0,0 +1,71 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/files/glance-2.initd,v 1.1 2013/09/26 00:58:07 prometheanfire Exp $
+
+depend() {
+ need net
+}
+
+BASENAME=$(echo $SVCNAME | cut -d '-' -f 1)
+SERVERNAME=$(echo $SVCNAME | cut -d '-' -f 2)
+SERVICES=( api registry scrubber )
+if [ ${SVCNAME} == 'glance' ]; then
+ SERVERNAME='all'
+fi
+
+checkconfig() {
+ if [ ! -r /etc/conf.d/$BASENAME ]; then
+ eerror "No glance conf.dfile found: /etc/conf.d/$BASENAME)"
+ return 1
+ fi
+ if [ ${SVCNAME} == 'glance' ]; then
+ for service in ${SERVICES[*]}; do
+ if [ ! -r /etc/glance/glance-${service}.conf ]; then
+ eerror "No glance-${SERVICE} config file found: /etc/glance/glance-${SERVICE}.conf)"
+ return 1
+ fi
+ done
+ elif [ ! -r /etc/glance/${SVCNAME}.conf ]; then
+ eerror "No ${BASENAME} config file found: /etc/glance/${SVCNAME}.conf)"
+ return 1
+ fi
+ return 0
+}
+
+
+start() {
+ checkconfig || return $?
+ . /etc/conf.d/$BASENAME
+
+ ebegin "Starting ${SVCNAME}"
+ if [ ! -d ${PID_PATH} ]; then
+ mkdir ${PID_PATH}
+ fi
+
+ start-stop-daemon --start --quiet --pidfile "${PID_PATH}/${SVCNAME}.pid" --exec /usr/bin/glance-control ${SERVERNAME} start
+
+ eend $? "Failed to start ${SVCNAME}"
+}
+
+stop() {
+ checkconfig || return $?
+ . /etc/conf.d/$BASENAME
+
+ ebegin "Stopping ${SVCNAME}"
+
+ if [ ${SVCNAME} == 'glance' ]; then
+ for service in ${SERVICES[*]}; do
+ start-stop-daemon --stop --quiet --pidfile "${PID_PATH}/glance-${service}.pid" \
+ --exec /usr/bin/glance-control ${service} stop /etc/glance/glance-${service}.conf
+ done
+ else
+ start-stop-daemon --stop --quiet --pidfile "${PID_PATH}/${SVCNAME}.pid" \
+ --exec /usr/bin/glance-control ${SERVERNAME} stop /etc/glance/glance-${SERVERNAME}.conf
+ fi
+ eend $? "Failed to stop ${SVCNAME}"
+}
+
+#restart() {
+#
+#}
diff --git a/app-admin/glance/glance-2013.1.9999.ebuild b/app-admin/glance/glance-2013.1.9999.ebuild
index 1f0b159c0e9a..fc54c3915ed4 100644
--- a/app-admin/glance/glance-2013.1.9999.ebuild
+++ b/app-admin/glance/glance-2013.1.9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/glance-2013.1.9999.ebuild,v 1.4 2013/09/14 09:35:34 prometheanfire Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/glance-2013.1.9999.ebuild,v 1.5 2013/09/26 00:58:07 prometheanfire Exp $
EAPI=5
PYTHON_COMPAT=( python2_7 )
@@ -61,7 +61,7 @@ PATCHES=(
python_install() {
distutils-r1_python_install
newconfd "${FILESDIR}/glance.confd" glance
- newinitd "${FILESDIR}/glance.initd" glance
+ newinitd "${FILESDIR}/glance-2.initd" glance
for function in api registry scrubber; do
dosym /etc/init.d/glance /etc/init.d/glance-${function}
diff --git a/app-admin/glance/glance-9999.ebuild b/app-admin/glance/glance-9999.ebuild
index 830e2b9826e2..ff3ae4fa7ed5 100644
--- a/app-admin/glance/glance-9999.ebuild
+++ b/app-admin/glance/glance-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/glance-9999.ebuild,v 1.5 2013/09/12 04:47:49 prometheanfire Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/glance/glance-9999.ebuild,v 1.6 2013/09/26 00:58:07 prometheanfire Exp $
EAPI=5
PYTHON_COMPAT=( python2_7 )
@@ -57,7 +57,7 @@ RDEPEND="${DEPEND}
python_install() {
distutils-r1_python_install
newconfd "${FILESDIR}/glance.confd" glance
- newinitd "${FILESDIR}/glance.initd" glance
+ newinitd "${FILESDIR}/glance-2.initd" glance
for function in api registry scrubber; do
dosym /etc/init.d/glance /etc/init.d/glance-${function}