Merge "Set variables in rsyslog.conf to disable rate-limiting."

This commit is contained in:
Jenkins 2013-06-07 01:02:14 +00:00 committed by Gerrit Code Review
commit 11632774f3

View File

@ -790,6 +790,22 @@ EOF
EOF EOF
sudo mv /tmp/90-stack-s.conf /etc/rsyslog.d sudo mv /tmp/90-stack-s.conf /etc/rsyslog.d
fi fi
RSYSLOGCONF="/etc/rsyslog.conf"
if [ -f $RSYSLOGCONF ]; then
sudo cp -b $RSYSLOGCONF $RSYSLOGCONF.bak
if [[ $(grep '$SystemLogRateLimitBurst' $RSYSLOGCONF) ]]; then
sudo sed -i 's/$SystemLogRateLimitBurst\ .*/$SystemLogRateLimitBurst\ 0/' $RSYSLOGCONF
else
sudo sed -i '$ i $SystemLogRateLimitBurst\ 0' $RSYSLOGCONF
fi
if [[ $(grep '$SystemLogRateLimitInterval' $RSYSLOGCONF) ]]; then
sudo sed -i 's/$SystemLogRateLimitInterval\ .*/$SystemLogRateLimitInterval\ 0/' $RSYSLOGCONF
else
sudo sed -i '$ i $SystemLogRateLimitInterval\ 0' $RSYSLOGCONF
fi
fi
echo_summary "Starting rsyslog" echo_summary "Starting rsyslog"
restart_service rsyslog restart_service rsyslog
fi fi