Remote syslog support from OpenELEC settings

This patch adds remote syslog support. The syslog startup script will add the necessary options, and leaves room for a custom syslog.conf from /storage/.config (as it was before).
This commit is contained in:
Dag Wieers 2013-02-08 23:31:56 +01:00
parent 64615c332e
commit ab35dbe2ae
4 changed files with 23 additions and 4 deletions

View File

@ -31,6 +31,8 @@
<setting id="SAMBA_SECURITY" value="false" />
<setting id="SAMBA_USERNAME" value="openelec" />
<setting id="SAMBA_PASSWORD" value="openelec" />
<setting id="SYSLOG_REMOTE" value="false" />
<setting id="SYSLOG_SERVER" value="" />
<setting id="CROND_START" value="false" />
<setting id="UPDATE_AUTO" value="manual" />
<setting id="X11_KEYMAP" value="us" />

View File

@ -50,4 +50,8 @@
<string id="5030">crond</string>
<string id="5031">Start cron daemon at boot</string>
<string id="5040">syslog</string>
<string id="5041">Use remote syslog server</string>
<string id="5042">Remote syslog IP address</string>
</strings>

View File

@ -81,5 +81,9 @@
<setting label="5030" type="lsep"/>
<setting type="sep" />
<setting id="CROND_START" type="bool" label="5031" default="false" />
<setting label="5040" type="lsep"/>
<setting type="sep" />
<setting id="SYSLOG_REMOTE" type="bool" label="5041" default="false" />
<setting id="SYSLOG_SERVER" type="ipaddress" label="5042" default="" visible="eq(-1,true)" />
</category>
</settings>

View File

@ -25,12 +25,21 @@
(
progress "Starting Syslog daemon"
if [ -f /storage/.config/syslog.conf ]; then
syslogd -f /storage/.config/syslog.conf
else
syslogd
source /var/config/settings.conf
SYSLOGD_OPTIONS="-L"
if [ "$SYSLOG_REMOTE" == "true" -a "$SYSLOG_SERVER" ]; then
SYSLOGD_OPTIONS="$SYSLOGD_OPTIONS -R $SYSLOG_SERVER"
fi
if [ -f /storage/.config/syslog.conf ]; then
SYSLOGD_OPTIONS="$SYSLOGD_OPTIONS -f /storage/.config/syslog.conf"
fi
syslogd $SYSLOGD_OPTIONS
progress "Starting Kernellog daemon"
klogd
)&