summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-05-13 08:10:05 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-05-13 08:10:05 +0000
commit90ab44c3efec78854dcd4fc28662153fddc241c8 (patch)
tree15bc8b6719c21755be38850b414bcb1313809db1 /dev-perl/Gearman-Server/files
parentadd herd to missing metadata.xml files in category app-admin (diff)
downloadgentoo-2-90ab44c3efec78854dcd4fc28662153fddc241c8.tar.gz
gentoo-2-90ab44c3efec78854dcd4fc28662153fddc241c8.tar.bz2
gentoo-2-90ab44c3efec78854dcd4fc28662153fddc241c8.zip
Patch gearmand to have a suitable cmdline in the process listing, and thus simplify the init script greatly.
(Portage version: 2.1.2.7)
Diffstat (limited to 'dev-perl/Gearman-Server/files')
-rw-r--r--dev-perl/Gearman-Server/files/Gearman-Server-1.09-Use-saner-name-in-process-listing.patch33
-rw-r--r--dev-perl/Gearman-Server/files/digest-Gearman-Server-1.09-r13
-rw-r--r--dev-perl/Gearman-Server/files/gearmand-init.d-1.0916
3 files changed, 40 insertions, 12 deletions
diff --git a/dev-perl/Gearman-Server/files/Gearman-Server-1.09-Use-saner-name-in-process-listing.patch b/dev-perl/Gearman-Server/files/Gearman-Server-1.09-Use-saner-name-in-process-listing.patch
new file mode 100644
index 000000000000..f57360673ca8
--- /dev/null
+++ b/dev-perl/Gearman-Server/files/Gearman-Server-1.09-Use-saner-name-in-process-listing.patch
@@ -0,0 +1,33 @@
+From 6d8055b1d44d745f194665458674c6e03f48f322 Mon Sep 17 00:00:00 2001
+From: Robin H. Johnson <robbat2@gentoo.org>
+Date: Sat, 12 May 2007 22:16:37 -0700
+Subject: [PATCH gearman] Use saner name in process listing.
+
+Normally the binary will turn up in the process list as:
+/usr/bin/perl $SCRIPTNAME
+
+By adding a single line, we can make it be simply '$SCRIPTNAME'.
+This makes writing init.d scripts signficently easier.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+---
+ server/gearmand | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/server/gearmand b/server/gearmand
+index 2d8bd6b..148b1f9 100755
+--- a/server/gearmand
++++ b/server/gearmand
+@@ -94,6 +94,9 @@ my (
+ );
+ my $conf_port = 7003;
+
++# Rename binary in process list to make init scripts saner
++$0 = $_ = $0;
++
+ Getopt::Long::GetOptions(
+ 'd|daemonize' => \$daemonize,
+ 'p|port=i' => \$conf_port,
+--
+1.5.1.4
+
diff --git a/dev-perl/Gearman-Server/files/digest-Gearman-Server-1.09-r1 b/dev-perl/Gearman-Server/files/digest-Gearman-Server-1.09-r1
new file mode 100644
index 000000000000..3ad5ab6b1b3b
--- /dev/null
+++ b/dev-perl/Gearman-Server/files/digest-Gearman-Server-1.09-r1
@@ -0,0 +1,3 @@
+MD5 3d107089f7266ab91d66d9a7bd90430f Gearman-Server-1.09.tar.gz 11282
+RMD160 aab3786eec7a550f08ae4e521b207c555a9fa671 Gearman-Server-1.09.tar.gz 11282
+SHA256 472c47d154a7168c627aad97fe04abdb3010275315e26382e13982ec4062a8cd Gearman-Server-1.09.tar.gz 11282
diff --git a/dev-perl/Gearman-Server/files/gearmand-init.d-1.09 b/dev-perl/Gearman-Server/files/gearmand-init.d-1.09
index ef445e5dbd9d..5b8c053089c9 100644
--- a/dev-perl/Gearman-Server/files/gearmand-init.d-1.09
+++ b/dev-perl/Gearman-Server/files/gearmand-init.d-1.09
@@ -1,5 +1,5 @@
#!/sbin/runscript
-# $Header: /var/cvsroot/gentoo-x86/dev-perl/Gearman-Server/files/gearmand-init.d-1.09,v 1.1 2007/05/13 02:18:42 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/Gearman-Server/files/gearmand-init.d-1.09,v 1.2 2007/05/13 08:10:05 robbat2 Exp $
NAME="gearmand"
BINARY="/usr/bin/gearmand"
@@ -12,23 +12,15 @@ start() {
# start-stop-daemon does not work properly in certain cases
# this hack should go away when bug #178274 is resolved.
ebegin "Starting $NAME"
- ${BINARY} ${GEARMAND_OPTS}
- rc=$?
- [ $rc -ne 0 ] && eend $rc
- local i=0
- # wait 4*500ms
- while [ $i -lt 4 ] && ! [ -s $PIDFILE ]; do
- sleep 0.5
- i=$(($i+1))
- done
- # final check
- start-stop-daemon --oknodo --start --pidfile="${PIDFILE}" \
+ start-stop-daemon --start --pidfile="${PIDFILE}" \
--exec ${BINARY} -- ${GEARMAND_OPTS}
eend $?
}
+
stop() {
ebegin "Stopping $NAME"
start-stop-daemon --stop --pidfile="${PIDFILE}"
eend $?
}
+
# vim: ft=gentoo-init-d: