diff options
Diffstat (limited to 'dev-perl/Perlbal/files')
-rw-r--r-- | dev-perl/Perlbal/files/Perlbal-1.58-Use-saner-name-in-process-listing.patch | 34 | ||||
-rw-r--r-- | dev-perl/Perlbal/files/perlbal_conf.d_1.58 | 5 | ||||
-rwxr-xr-x | dev-perl/Perlbal/files/perlbal_init.d_1.58 | 25 |
3 files changed, 64 insertions, 0 deletions
diff --git a/dev-perl/Perlbal/files/Perlbal-1.58-Use-saner-name-in-process-listing.patch b/dev-perl/Perlbal/files/Perlbal-1.58-Use-saner-name-in-process-listing.patch new file mode 100644 index 00000000000..1ccafb9cb9b --- /dev/null +++ b/dev-perl/Perlbal/files/Perlbal-1.58-Use-saner-name-in-process-listing.patch @@ -0,0 +1,34 @@ +From 75b0930eb392c6389f6e96b0c1df067ae917b962 Mon Sep 17 00:00:00 2001 +From: Robin H. Johnson <robbat2@gentoo.org> +Date: Sat, 12 May 2007 21:32:53 -0700 +Subject: [PATCH perlbal] 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> +--- + perlbal | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/perlbal b/perlbal +index f0149b3..7a9d28c 100755 +--- a/perlbal ++++ b/perlbal +@@ -37,6 +37,10 @@ my $opt_daemonize; + my $opt_config; + my $opt_help; + my $opt_version; ++ ++# Rename binary in process list to make init scripts saner ++$0 = $_ = $0; ++ + usage(1) unless + Getopt::Long::GetOptions( + 'daemon' => \$opt_daemonize, +-- +1.5.1.4 + diff --git a/dev-perl/Perlbal/files/perlbal_conf.d_1.58 b/dev-perl/Perlbal/files/perlbal_conf.d_1.58 new file mode 100644 index 00000000000..626e50bfa56 --- /dev/null +++ b/dev-perl/Perlbal/files/perlbal_conf.d_1.58 @@ -0,0 +1,5 @@ +# $Id$ +# PIDFILE is not yet used, pending upstream still +#PIDFILE="/var/run/perlbal.pid" +PERLBAL_OPTS="--daemon --config=/etc/perlbal/perlbal.conf" +# vim: ft=gentoo-conf-d: diff --git a/dev-perl/Perlbal/files/perlbal_init.d_1.58 b/dev-perl/Perlbal/files/perlbal_init.d_1.58 new file mode 100755 index 00000000000..13d01bc1de2 --- /dev/null +++ b/dev-perl/Perlbal/files/perlbal_init.d_1.58 @@ -0,0 +1,25 @@ +#!/sbin/runscript +# $Id$ + +NAME="perlbal" +BINARY="/usr/bin/perlbal" + +depend() { + use net +} + +start() { + ebegin "Starting $NAME" + # Add --pidfile when upstream supports PIDFILES + start-stop-daemon --start \ + --exec ${BINARY} -- ${PERLBAL_OPTS} + eend $? +} + +stop() { + ebegin "Stopping $NAME" + start-stop-daemon --stop --exec "${BINARY}" + eend $? +} + +# vim: ft=gentoo-init-d: |