Juan Hernandez has posted comments on this change.
Change subject: packaging: log rotation - do not execute ls on non-existing
files
......................................................................
Patch Set 2: (1 inline comment)
....................................................
File packaging/resources/ovirtlogrot.sh
Line 12: date=`date $dateformat`
Line 13:
Line 14: for i in $logdir/{engine,server,jasperserver}.log.*; do
Line 15: m=`expr match $i '.*\(gz\|xz\)'`
Line 16: if [[ -z "$m" && -r "$i" ]]
Can we use -a instead of && so that we don't need to use the bash specific [[
... ]] construct?
Line 17: then
Line 18: cat $i | xz > $i-${date}_`/bin/date +%N | cut -c6-`.xz && rm $i
Line 19: fi
Line 20: done;
--
To view, visit http://gerrit.ovirt.org/14097
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Icb3d443dd26c6e22302a694c1d0f433383f312b7
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Kiril Nesenko <[email protected]>
Gerrit-Reviewer: Moran Goldboim <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches