Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 600938 - sys-kernel/dracut-044-r1 modules.d syslog-genrules.sh looks for syslog in obsolete /sbin/ location
Summary: sys-kernel/dracut-044-r1 modules.d syslog-genrules.sh looks for syslog in obs...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-26 20:14 UTC by matt black
Modified: 2023-09-08 09:24 UTC (History)
1 user (show)

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


Attachments
emerge --info (emerge.info,7.53 KB, text/plain)
2016-11-26 20:17 UTC, matt black
Details
syslog-genrules.sh (syslog-genrules.sh,1.01 KB, text/plain)
2016-11-26 23:12 UTC, matt black
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matt black 2016-11-26 20:14:38 UTC
Seems that location of syslog-ng executable (and perhaps syslogd and rsyslogd also) has been recently changed from /sbin to /usr/sbin. Dracut is not aware of this change and now fails to start syslog-ng with following dmesg:

dracut Warning: syslog-genrules: Could not find binary to start syslog of type "syslog-ng". Syslog will not be started.

The checks and start-script are in /usr/lib/dracut/modules.d/98syslog/syslog-genrules.sh

detect_syslog() {
    syslogtype=""
    if [ -e /sbin/rsyslogd ]; then
        syslogtype="rsyslogd"
    elif [ -e /sbin/syslogd ]; then
        syslogtype="syslogd"
    elif [ /sbin/syslog-ng ]; then
        syslogtype="syslog-ng"
    else
        warn "Could not find any syslog binary although the syslogmodule is selected to be installed. Please check."

Hmmm...  looks like a '-e' is missing from the syslog-ng check also.

Reproducible: Always

Steps to Reproduce:
1.Install syslog-ng and dracut
2.Build initrd with dracut
3.Reboot system
Actual Results:  
[    1.717349] dracut Warning: syslog-genrules: Could not find binary to start syslog of type "syslog-ng". Syslog will not be started.


[I] sys-kernel/dracut
     Available versions:  (~)040-r3^t (~)041-r3^t (~)043-r2^t (~)044^t (~)044-r1^t {debug selinux systemd}
     Installed versions:  044-r1^t(01:48:49 PM 11/26/2016)(-debug -selinux -systemd)

[I] app-admin/syslog-ng
     Available versions:  3.4.8^t 3.6.2^t 3.6.4^t 3.7.2^t 3.7.3^t {amqp caps dbi geoip ipv6 json libressl mongodb pacct +pcre python redis smtp spoof-source ssl systemd tcpd}
     Installed versions:  3.7.3^t(04:25:37 AM 09/17/2016)(caps ipv6 python tcpd -amqp -dbi -geoip -json -libressl -mongodb -pacct -redis -smtp -spoof-source -systemd)
Comment 1 matt black 2016-11-26 20:17:26 UTC
Created attachment 454468 [details]
emerge --info
Comment 2 matt black 2016-11-26 23:10:01 UTC
These lines in syslog-genrules.sh also look in the wrong place for a non-existent binary named syslog-ng-start:

if [ -e "/sbin/${syslogtype}-start" ]; then
    printf 'ACTION=="online", SUBSYSTEM=="net", RUN+="/sbin/initqueue --onetime /sbin/'${syslogtype}'-start $env{INTERFACE}"\n' > /etc/udev/rules.d/70-syslog.rules
else
    warn "syslog-genrules: Could not find binary to start syslog of type \"$syslogtype\". Syslog will not be started."
Comment 3 matt black 2016-11-26 23:12:22 UTC
Created attachment 454474 [details]
syslog-genrules.sh
Comment 4 Alexander Tsoy 2018-09-11 07:06:25 UTC
(In reply to matt black from comment #0)
>     elif [ /sbin/syslog-ng ]; then
>         syslogtype="syslog-ng"
>     else
>         warn "Could not find any syslog binary although the syslogmodule is
> selected to be installed. Please check."
> 
> Hmmm...  looks like a '-e' is missing from the syslog-ng check also.
Yes. This was fixed recently.

(In reply to matt black from comment #2)
> These lines in syslog-genrules.sh also look in the wrong place for a
> non-existent binary named syslog-ng-start:
syslog module is awful. "Support" for syslog-ng and syslogd doesn't go beyond copying binaries into initramfs. But rsyslog should work fine if we fix detect_syslog().