Do not modify rsyslog files if rsyslog is not used.

Swift was missing an 'if [[ $SYSLOG != "False" ]]' statement which is used
by other services, and therefor failed with a 'No such file or directory'
error when 'SYSLOG=False' was set in localrc.

Closes-Bug: 1308461

Change-Id: I8655a955ebb322516d92bee418b93d4cc23bdc5c
This commit is contained in:
Yves-Gwenael Bourhis 2014-04-16 13:37:46 +02:00
parent 404fbfefe2
commit f894c2ab80

View File

@ -453,10 +453,13 @@ EOF
rm -rf ${swift_log_dir}
mkdir -p ${swift_log_dir}/hourly
sudo chown -R ${STACK_USER}:adm ${swift_log_dir}
sed "s,%SWIFT_LOGDIR%,${swift_log_dir}," $FILES/swift/rsyslog.conf | sudo \
tee /etc/rsyslog.d/10-swift.conf
# restart syslog to take the changes
sudo killall -HUP rsyslogd
if [[ $SYSLOG != "False" ]]; then
sed "s,%SWIFT_LOGDIR%,${swift_log_dir}," $FILES/swift/rsyslog.conf | sudo \
tee /etc/rsyslog.d/10-swift.conf
# restart syslog to take the changes
sudo killall -HUP rsyslogd
fi
if is_apache_enabled_service swift; then
_config_swift_apache_wsgi