Commit f0f5ec8c authored by Alessandro Rubini's avatar Alessandro Rubini

config: ask for remote syslog host and mode

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 3773a668
......@@ -59,6 +59,18 @@ config DNS_DOMAIN
If CONFIG_DNS_SERVER is being used, this option may be
useful as well.
config REMOTE_SYSLOG_SERVER
string "Send WRS syslog messages to this remote host"
help
This IP address or name, if not empty enables remote syslog
in the switch; all messages are sent to this specific host.
config REMOTE_SYSLOG_UDP
bool "Use UDP for syslog messages"
default y
help
Select UDP to send system logs. If not set, TCP is used.
config KEEP_ROOTFS
bool "Keep generated filesystem and related script"
help
......
......@@ -53,6 +53,14 @@ if [ ! -z "$CONFIG_DNS_SERVER" ]; then
fi
fi
if [ "$CONFIG_REMOTE_SYSLOG_UDP" = "y" ]; then
sed -i 's/@@remote-host/@remote-host/' $TMPFS/etc/rsyslog.conf
fi
if [ ! -z "$CONFIG_REMOTE_SYSLOG_SERVER" ]; then
sed -i '/remote-host/ s/^##//' $TMPFS/etc/rsyslog.conf
sed -i 's/remote-host/$CONFIG_REMOTE_SYSLOG_SERVER/' $TMPFS/etc/rsyslog.conf
fi
mkdir -p $TMPFS/root/.ssh
#cat $HOME/.ssh/id_?sa.pub >> $TMPFS/root/.ssh/authorized_keys
if [ -f $WRS_BASE_DIR/authorized_keys ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment