Merge "xenapi: Fix console rotate script"

This commit is contained in:
Jenkins 2013-07-27 14:57:33 +00:00 committed by Gerrit Code Review
commit 7f45bacc53

View File

@ -44,6 +44,8 @@ domains=$($list_domains | sed '/^id*/d' | sed 's/|.*|.*$//g' | xargs)
for i in $domains; do
log="${log_file_base}$i"
tmp="${tmp_file_base}$i"
if [ -e "$tmp" ]; then
size=$(stat -c%s "$tmp")
# Trim the log if required
@ -52,6 +54,7 @@ for i in $domains; do
else
mv $tmp $log || true
fi
fi
# Notify xen that it needs to reload the file
xenstore-write /local/logconsole/$i $log