Summary: | syslog-ng fails to start when using network logging, because it does not depend on net | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Javier Fernandez-Ivern <javier> |
Component: | Current packages | Assignee: | Mr. Bones. (RETIRED) <mr_bones_> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | base-system, weeve |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Javier Fernandez-Ivern
2004-01-16 18:32:28 UTC
Michael, how about grepping /etc/syslog-ng/syslog-ng.conf for a pattern, then conditionally add the need in /etc/init.d/syslog-ng? That might work, but my first instinct for this bug is to say "Tough". syslog-ng works as shipped by Gentoo. If people start changing the config file, they should be ready to make any additional changes they need to their systems to support those changes. On the other hand, I wonder what the down-side would be of unconditionally adding need net to the syslog-ng init script. We could use a lesser dependency like use, but if you don't use network logging you normally would like syslog-ng to be started as soon as possible, which is before net is started. Michael, imho files in /etc/init.d are not intended to be configuration files. They shouldn't need editing just because the configuration changed. Considering what Paul mentioned (about wanting syslog-ng to start ASAP if it doesn't depend on net), I think the best thing would be a grep. How about... depend() { # make networking dependency conditional on configuration sed 's/#.*//' /etc/syslog-ng/syslog-ng.conf | \ grep -Eq '(source|destination).*(tcp|udp)' && need net need clock hostname provide logger } I've adjusted my syslog-ng init script to need net and it seems to work well here. Fixed and closed |