Merge "Redirect fuel-logrotate's pgrep output to /dev/null"

This commit is contained in:
Jenkins 2015-06-02 20:56:34 +00:00 committed by Gerrit Code Review
commit 938f033a5d
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
# Due to bug in logrotate, it always returns 0. Use grep for detect errors;
# exit code 1 is considered a success as no errors were found.
if ! pgrep -x logrotate &>/dev/null; then
if ! pgrep -x logrotate >/dev/null 2>&1; then
nice ionice -c3 /usr/sbin/logrotate /etc/logrotate.d/fuel.nodaily >& /tmp/logrotate
grep -q error /tmp/logrotate
EXITVALUE=$?

View File

@ -11,7 +11,7 @@ done >> status.clean
mv status.clean status
test -x /usr/sbin/logrotate || exit 0
if ! pgrep -x logrotate &>/dev/null; then
if ! pgrep -x logrotate >/dev/null 2>&1; then
nice ionice -c3 /usr/sbin/logrotate /etc/logrotate.d/fuel.nodaily
EXITVALUE=$?
else