Hi,

procd seems to ignore START prioritization at boot time. The START value
defined in init scripts seems not to take effect anymore.

My particular issue is with log messages. I want to use syslog-ng to send
logs to a remote server using its rewriting, filtering, etc. capabilities.
The problem is that syslog-ng does not receive logs from services that were
started before itself during boot up.

So for example, 'autossh' has START=80 and 'syslog-ng' has START=50.
However, autossh is started a few seconds before syslog-ng and that means
that autossh logs are not processed by syslog-ng and can only be recovered
with 'logread'.

I have the default configuration of both services and so autossh keeps
logging that its child proccess dies and syslog-ng writes logs to
/var/log/messages:


# ls -l /etc/rc.d
lrwxrwxrwx    1 root     root            14 Sep 23 19:29 K50sshd ->
../init.d/sshd
lrwxrwxrwx    1 root     root            13 Sep 23 19:29 K89log ->
../init.d/log
lrwxrwxrwx    1 root     root            17 Sep 23 19:29 K90network ->
../init.d/network
lrwxrwxrwx    1 root     root            22 Sep 23 19:29 K95luci_fixtime ->
../init.d/luci_fixtime
lrwxrwxrwx    1 root     root            14 Sep 23 19:29 K98boot ->
../init.d/boot
lrwxrwxrwx    1 root     root            16 Sep 23 19:29 K99umount ->
../init.d/umount
lrwxrwxrwx    1 root     root            22 Sep 23 19:29 S05luci_fixtime ->
../init.d/luci_fixtime
lrwxrwxrwx    1 root     root            14 Sep 23 19:29 S10boot ->
../init.d/boot
lrwxrwxrwx    1 root     root            16 Sep 23 19:29 S11sysctl ->
../init.d/sysctl
lrwxrwxrwx    1 root     root            18 Sep 23 19:29 S19firewall ->
../init.d/firewall
lrwxrwxrwx    1 root     root            17 Sep 23 19:29 S20network ->
../init.d/network
lrwxrwxrwx    1 root     root            13 Sep 23 19:29 S21log ->
../init.d/log
lrwxrwxrwx    1 root     root            14 Sep 23 19:29 S50cron ->
../init.d/cron
lrwxrwxrwx    1 root     root            17 Sep 23 19:29 S50radiusd ->
../init.d/radiusd
lrwxrwxrwx    1 root     root            14 Sep 23 19:29 S50sshd ->
../init.d/sshd
lrwxrwxrwx    1 root     root            19 Sep 27 11:49 *S50syslog-ng ->
../init.d/syslog-ng*
lrwxrwxrwx    1 root     root            16 Sep 23 19:29 S50telnet ->
../init.d/telnet
lrwxrwxrwx    1 root     root            16 Sep 23 19:29 S50uhttpd ->
../init.d/uhttpd
lrwxrwxrwx    1 root     root            27 Sep 23 19:29
S59luci_dhcp_migrate -> ../init.d/luci_dhcp_migrate
lrwxrwxrwx    1 root     root            17 Sep 23 19:29 S60dnsmasq ->
../init.d/dnsmasq
lrwxrwxrwx    1 root     root            17 Sep 27 14:22 *S80autossh ->
../init.d/autossh*
lrwxrwxrwx    1 root     root            14 Sep 23 19:29 S95done ->
../init.d/done
lrwxrwxrwx    1 root     root            13 Sep 23 19:29 S96led ->
../init.d/led
lrwxrwxrwx    1 root     root            17 Sep 27 11:52 S98sysntpd ->
../init.d/sysntpd

# logread
...
*Fri Sep 27 16:54:11* 2013 user.info *autossh*[654]: port set to 0,
monitoring disabled
Fri Sep 27 16:54:11 2013 user.info autossh[654]: starting ssh (count 1)
Fri Sep 27 16:54:11 2013 user.info autossh[654]: ssh child pid is 674
...
Fri Sep 27 16:57:54 2013 user.info autossh[654]: ssh exited with error
status 255; restarting ssh
Fri Sep 27 16:59:32 2013 user.info autossh[654]: starting ssh (count 13)
Fri Sep 27 16:59:32 2013 user.info autossh[654]: ssh child pid is 3601
Fri Sep 27 16:59:32 2013 user.info autossh[654]: ssh exited with error
status 255; restarting ssh
Fri Sep 27 17:01:40 2013 user.info autossh[654]: starting ssh (count 14)
Fri Sep 27 17:01:40 2013 user.info autossh[654]: ssh child pid is 4374
...

# cat /var/log/messages
*Sep 27 16:54:16* bewifibox7000 syslog-ng[851]: *syslog-ng version 1.6.12
starting*
Sep 27 16:54:22 bewifibox7000 dnsmasq: DNS rebinding protection is active,
will discard upstream RFC1918 responses!
Sep 27 16:54:22 bewifibox7000 dnsmasq: Allowing 127.0.0.0/8 responses

...



So my questions are:


   - Why syslog-ng is not capturing autossh logs?
   - Is ordering of init scripts no longer ensured or the scripts are run
   in order but syslog-ng take much longer (seconds) to initialize once in
   background than autossh?


Thanks in advance,
Diego
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to