pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45333: Startup script for www/c-icap is missing.



>Number:         45333
>Category:       pkg
>Synopsis:       Startup script for www/c-icap is missing.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 06 07:55:00 +0000 2011
>Originator:     M. Meiarashi
>Release:        
>Organization:
>Environment:
>Description:
Startup script for www/c-icap is not provided.
>How-To-Repeat:
"make install" at www/c-icap.
>Fix:
Here is an attempt of a patch against c-icap.

diff -uNr c-icap-orig/Makefile c-icap/Makefile
--- c-icap-orig/Makefile        2011-09-06 16:32:11.000000000 +0900
+++ c-icap/Makefile     2011-09-06 16:38:13.000000000 +0900
@@ -24,6 +24,8 @@
 
 BUILD_DEFS+=           VARBASE
 
+RCD_SCRIPTS=   c_icap
+
 SUBST_CLASSES+=                fix-path
 SUBST_STAGE.fix-path=  pre-configure
 SUBST_MESSAGE.fix-path=        Fixing paths.
diff -uNr c-icap-orig/PLIST c-icap/PLIST
--- c-icap-orig/PLIST   2011-09-06 16:32:11.000000000 +0900
+++ c-icap/PLIST        2011-09-06 16:43:10.000000000 +0900
@@ -50,3 +50,4 @@
 man/man8/c-icap.8
 share/c-icap/c-icap.conf.default
 share/c-icap/c-icap.magic.default
+share/examples/rc.d/c_icap
diff -uNr c-icap-orig/files/c_icap.sh c-icap/files/c_icap.sh
--- c-icap-orig/files/c_icap.sh 1970-01-01 09:00:00.000000000 +0900
+++ c-icap/files/c_icap.sh      2011-09-06 16:32:33.000000000 +0900
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# PROVIDE: c-icap
+# REQUIRE: DAEMON
+# BEFORE:  LOGIN
+
+name="c_icap"
+rcvar=$name
+command="/usr/pkg/bin/c-icap"
+required_files="/usr/pkg/etc/c-icap.conf /usr/pkg/etc/c-icap.magic"
+pidfile="/var/run/c-icap/c-icap.pid"
+extra_commands="reload reconfigure dump_statistics"
+reload_cmd="echo -n \"reconfigure\" > /var/run/c-icap/c-icap.ctl"
+reconfigure_cmd=${reload_cmd}
+dump_statistics_cmd="echo -n \"dump_statistics\" > /var/run/c-icap.ctl"
+
+. /etc/rc.subr
+
+
+c_icap_precmd()
+{
+    if [ ! -d /var/run/c-icap ]; then
+       /bin/mkdir -p /var/run/c-icap
+    fi
+}
+
+
+load_rc_config $name
+run_rc_command "$1"



Home | Main Index | Thread Index | Old Index