Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8885 - metalog initscript lacks --daemonize
Summary: metalog initscript lacks --daemonize
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Donny Davies (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-08 04:49 UTC by Jonathan Rogers
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
my current metalog initscript (metalog,699 bytes, text/plain)
2002-10-08 04:50 UTC, Jonathan Rogers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Rogers 2002-10-08 04:49:03 UTC
According to the metalog manpage, the /usr/sbin/metalog command should be given
the "--daemonize" option to run it in the background. However, the initscript
supplied does not use it.

The strange thing is that the initscript works normally out of the box. I only
discovered something was amiss when I added an option for starting metalog.
Since the start() function looks for extra options to metalog in the variable
METALOG_OPTS, I added this line near the beginning of the file: 

METALOG_OPTS="--synchronous"

After adding that line, the initscript would hang after starting metalog. The
metalog daemons started normally, according to ps. However, the initscript
wasn't returning. This is the behavior I'd expect from reading the metalog and
start-stop-daemon manpages. I added "--daemonize" to the metalog options and it
works fine.

The only thing I can't figure out is why the initscript didn't freeze out of the
box. When I ran the whole start-stop-daemon command ( "start-stop-daemon --start
--quiet --exec /usr/sbin/metalog -- -p /var/run/metalog.pid") from the shell, it
blocked every time, though ps showed the daemons had started. When I then hit
Ctrl-C, the daemon would exit. Again, this is expected behavior; it's just
amazing the thing ever worked right.

Anyway, I'm sure "--daemonize" should be specified. I've attached my current
metalog initscript.
Comment 1 Jonathan Rogers 2002-10-08 04:50:46 UTC
Created attachment 4503 [details]
my current metalog initscript

This should be usable for anyone, but others may not want the "--synchronous"
behavior.
Comment 2 Donny Davies (RETIRED) gentoo-dev 2002-10-12 01:09:26 UTC
thx, fixed.