Skip to content

banip: /usr/bin/tail: unrecognized option: e - when using syslog-ng istead of logd #28036

@djarosz

Description

@djarosz

Package Name

banip

Maintainer

(@dibdot)

OpenWrt Version

24.10.4

OpenWrt Target/Subtarget

x86/64

Steps to Reproduce

Install syslog-ng instead of logd and restart bain service and then check openwrt logs.
Possibly only creating /var/log/messages file will trigger this behavior.

Actual Behaviour

When used with syslog-ng banip logs error like one below

Dec  8 18:17:13 openwrt banIP-1.5.6-r7[16128]: start banIP processing (start, 1.5.6-r7)
Dec  8 18:17:13 openwrt banIP-1.5.6-r7[16128]: initialize banIP nftables namespace
Dec  8 18:17:13 openwrt banIP-1.5.6-r7[16128]: start banIP download processes
Dec  8 18:17:14 openwrt banIP-1.5.6-r7[16128]: start banIP domain lookup
Dec  8 18:17:14 openwrt banIP-1.5.6-r7[16128]: finish banIP processing
Dec  8 18:17:14 openwrt banIP-1.5.6-r7[16128]: start detached banIP log service (/usr/bin/tail)
Dec  8 18:17:19 openwrt banip-service.sh[16128]: /usr/bin/tail: unrecognized option: e
Dec  8 18:17:19 openwrt banip-service.sh[16128]: BusyBox v1.36.1 (2025-10-24 10:05:32 UTC) multi-call binary.
Dec  8 18:17:19 openwrt banip-service.sh[16128]:
Dec  8 18:17:19 openwrt banip-service.sh[16128]: Usage: tail [OPTIONS] [FILE]...
Dec  8 18:17:19 openwrt banip-service.sh[16128]:
Dec  8 18:17:19 openwrt banip-service.sh[16128]: Print last 10 lines of FILEs (or stdin) to.
Dec  8 18:17:19 openwrt banip-service.sh[16128]: With more than one FILE, precede each with a filename header.
Dec  8 18:17:19 openwrt banip-service.sh[16128]:
Dec  8 18:17:19 openwrt banip-service.sh[16128]: 	-c [+]N[bkm]	Print last N bytes
Dec  8 18:17:19 openwrt banip-service.sh[16128]: 	-n N[bkm]	Print last N lines
Dec  8 18:17:19 openwrt banip-service.sh[16128]: 	-n +N[bkm]	Start on Nth line and print the rest
Dec  8 18:17:19 openwrt banip-service.sh[16128]: 			(b:*512 k:*1024 m:*1024^2)
Dec  8 18:17:19 openwrt banip-service.sh[16128]: 	-q		Never print headers
Dec  8 18:17:19 openwrt banip-service.sh[16128]: 	-v		Always print headers
Dec  8 18:17:19 openwrt banip-service.sh[16128]: 	-f		Print data as file grows
Dec  8 18:17:19 openwrt banip-service.sh[16128]: 	-F		Same as -f, but keep retrying
Dec  8 18:17:19 openwrt banip-service.sh[16128]: 	-s SECONDS	Wait SECONDS between reads with -f

It loks like when /var/log/messages exist on the system then bainip uses tail instead of logread to read logs.

Quick and dirty work around is to fore banip to still use logread (syslog-ng ships with wrapper logread implementation) by editing banip-service.sh

#ban_logreadfile="/var/log/messages"
# use non exising file to force to use logread instead of tail
ban_logreadfile="/var/log/messages-force-use-of-logread"

Confirmation Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions