pkgsrc-Bugs archive

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

pkg/29224: patch for hanging net/maradns rc script



>Number:         29224
>Category:       pkg
>Synopsis:       patch for hanging net/maradns rc script
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 04 04:13:00 +0000 2005
>Originator:     Piotr Stolc
>Release:        NetBSD 2.0.1
>Organization:
soclab
>Environment:


System: NetBSD s 2.0.1 NetBSD 2.0.1 (S) #2: Tue Jan 25 03:44:17 CET 2005 
build@s:/build/src/sys/arch/i386/compile/S i386
Architecture: i386
Machine: i386
>Description:
maradns doesn't become into the daemon and the rc script hangs while
booting. below is my maybe nasty but working solution. maradns is logging
into stdout, so it redirects logs to /var/log/maradns.
the third thing it changes is the run order - maradns should be started
before daemons like squid which won't start without working DNS server.

>How-To-Repeat:
>Fix:
--- maradns.sh.orig     2003-09-27 04:29:18.000000000 +0200
+++ maradns.sh  2005-02-04 04:36:48.000000000 +0100
@@ -4,15 +4,23 @@
 #
 
 # PROVIDE: maradns
-# REQUIRE: DAEMON
+# REQUIRE: SERVERS
+# BEFORE:  DAEMON
 
 . /etc/rc.subr
 
 name="maradns"
 rcvar=$name
 command="@PREFIX@/sbin/${name}"
+command_args=">> /var/log/maradns &"
 pidfile="/var/run/${name}.pid"
 required_files="@PKG_SYSCONFDIR@/mararc"
+start_postcmd="maradns_postcmd"
+
+maradns_postcmd()
+{
+       echo $! > ${pidfile}
+}
 
 load_rc_config $name
 run_rc_command "$1"

>Unformatted:
 
 



Home | Main Index | Thread Index | Old Index