Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 144945

Summary: net-dns/maradns should log to syslog - init.d script mod
Product: Gentoo Linux Reporter: Clemens Fruhwirth <clemens>
Component: New packagesAssignee: MATSUU Takuto (RETIRED) <matsuu>
Status: RESOLVED DUPLICATE    
Severity: normal CC: chris
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Clemens Fruhwirth 2006-08-24 01:53:46 UTC
maradns is intented to be run with its stdout connected to a logger. 

change: 
        start-stop-daemon --start --quiet -b -m --pidfile /var/run/maradns.pid \
                --exec /usr/sbin/maradns
into:
        start-stop-daemon --start --quiet -m --pidfile /var/run/maradns.pid --exec /usr/sbin/maradns | logger -p daemon.notice -t maradns &

Same applies to zoneserver's init.d script.
Comment 1 Chris Smith 2006-11-28 14:03:38 UTC
I tried that, it works, but the shell runs all the time:

# ps ax | grep mara
 8450 pts/0    S      0:00 /bin/bash /sbin/runscript.sh /etc/init.d/maradns start
 8451 pts/0    S      0:00 logger -p daemon.notice -t maradns
 8454 pts/0    S      0:00 /usr/sbin/maradns

It looks like maradns is supposed to use duende as a "daemonizer", which handles the logging, but it doesn't work well with the pid method. I set up the init script like this which works fine here:

=========================================================
start() {
        ebegin "Starting maradns"
        start-stop-daemon --start --quiet -b --name maradns \
                --exec /usr/bin/duende /usr/sbin/maradns &
                eend $?
}

stop() {
        ebegin "Stopping maradns"
        start-stop-daemon --stop --quiet --name maradns
        eend $?
}
=========================================================

Now:
# ps ax | grep maradns
11103 ?        S      0:00 /usr/bin/duende /usr/sbin/maradns
11106 ?        S      0:00 /usr/sbin/maradns
11107 ?        S      0:00 /usr/bin/duende /usr/sbin/maradns

Which seems normal according to the dunde man page.

Comment 2 Chris Smith 2006-11-28 15:56:21 UTC
created a suggested ebuild with version bump and init script changes at http://bugs.gentoo.org/show_bug.cgi?id=156564
Comment 3 MATSUU Takuto (RETIRED) gentoo-dev 2006-12-02 19:59:36 UTC

*** This bug has been marked as a duplicate of 156564 ***