NetBSD Problem Report #45333

From www@NetBSD.org  Tue Sep  6 07:52:21 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 2BC5263C7A8
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  6 Sep 2011 07:52:21 +0000 (UTC)
Message-Id: <20110906075220.498EF63C789@www.NetBSD.org>
Date: Tue,  6 Sep 2011 07:52:20 +0000 (UTC)
From: mes@yki.jp
Reply-To: mes@yki.jp
To: gnats-bugs@NetBSD.org
Subject: Startup script for www/c-icap is missing.
X-Send-Pr-Version: www-1.0

>Number:         45333
>Category:       pkg
>Synopsis:       Startup script for www/c-icap is missing.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    adam
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 06 07:55:00 +0000 2011
>Last-Modified:  Tue Sep 06 08:53:12 +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"

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->adam
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Tue, 06 Sep 2011 08:53:12 +0000
Responsible-Changed-Why:
Over to maintainer.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.