Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74428 - proposed fix for syslog-ng init script
Summary: proposed fix for syslog-ng init script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-14 14:18 UTC by mack
Modified: 2004-12-14 15:16 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mack 2004-12-14 14:18:13 UTC
Is use UDP sources on my syslog-ng loghost.  The init script has the following code that attempts to identify if these types of network sources are present in the syslog-ng.conf file:

depend() {
        # Make networking dependency conditional on configuration
        case $(sed 's/#.*//' /etc/syslog-ng/syslog-ng.conf) in
                source*tcp|source*udp|destination*tcp|destination*udp)
                        need net ;;
        esac

        need clock hostname
        provide logger
}
This does not seem to work.  Syslog-ng always fails during startup, and I have to start it manually.  However, the following changes seems to work:

depend() {
        # Make networking dependency conditional on configuration
        case $(sed 's/#.*//' /etc/syslog-ng/syslog-ng.conf) in
                *source*tcp*|*source*udp*|*destination*tcp*|*destination*udp*)
                        need net ;;
        esac
        need clock hostname
        provide logger
}

Apparrently, "source*tcp" translates to "anything with "source" beginning the line, followed by anything, followed by "tcp".  And, since "$(sed 's/#.*//' /etc/syslog-ng/syslog-ng.conf)" simply removes any commented lines and the truncates the result into on big string, there is only one line in the result, and it does not start with "source" or "desintation".  Adding the *'s seems to get around this issue.  There may be more elegant ways of doing this, but for my purposes I'm just poinging out the issue and have applied the fix on my machine until the init script is fixed.

hope this helps.

Reproducible: Always
Steps to Reproduce:
1.reboot machine
2.on reboot, see errors saying that it couldn't listen on the IP on the interface that wasn't brought up yet
3.
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-12-14 15:16:42 UTC
Fixed in -r2.  Thanks for taking the time to figure out the problem and provide a fix.