Oh, you're right
In fact I think there a great amount of bugs remaining in syslog subsystem on 4.0,
one example:
- Code: Select all
FSERV> /usr/syno/etc/rc.d/S22syslogng.sh start
Syslog-ng server start...
sh: or: unknown operand
sh: or: unknown operand
sh: or: unknown operand
sh: or: unknown operand
sh: or: unknown operand
sh: or: unknown operand
sh: or: unknown operand
The bug is inside the script "/usr/syno/syslogclient/scripts/runscript.sh"
- Code: Select all
if [ -n "${fac}" ]; then
if [ -z ${SYSLOGNG_FAC_FILTER_STRING} ]; then
SYSLOGNG_FAC_FILTER_STRING="program(${fac})"
else
SYSLOGNG_FAC_FILTER_STRING="${SYSLOGNG_FAC_FILTER_STRING} or program(${fac})"
fi
fi
There should be quotes around "${SYSLOGNG_FAC_FILTER_STRING}", like this
- Code: Select all
if [ -z "${SYSLOGNG_FAC_FILTER_STRING}" ]; then
Another one, inside the file "/usr/syno/etc/rc.d/S22syslogng.sh":
- Code: Select all
if [ "yes" == SYSLOGNG_SERVER_ENABLE ]; then
#When booting, leave this action for real run script if server is enable
echo "Leave start action for server run script"
exit;
fi
the "if" test is always false because the "$" has been forgotten, should have been:
- Code: Select all
if [ "yes" == $SYSLOGNG_SERVER_ENABLE ]; then
and the value of that variable comes from the code:
[code] SYSLOGNG_SERVER_ENABLE=`/bin/get_key_value ${FILE_SYSLOGNG_SETTING} server_enable`
but the value of "FILE_SYSLOGNG_SETTING" is "/usr/syno/etc/synosyslog/setting.conf" which *does not exists*!
Do you think synology dev team eople is already aware of those problems?