cluster: RHEL6 - Fix open flags so that logfile won't be truncated each time we open it.

rohara rohara at fedoraproject.org
Mon Jun 28 21:02:02 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=3d36ee013e11043800214f400fae6a6bebd2af41
Commit:        3d36ee013e11043800214f400fae6a6bebd2af41
Parent:        bb9f20a6bd89d4b018d5f1df8bbbfcd402061738
Author:        Ryan O'Hara <rohara at redhat.com>
AuthorDate:    Mon Jun 28 15:59:27 2010 -0500
Committer:     Ryan O'Hara <rohara at redhat.com>
CommitterDate: Mon Jun 28 15:59:27 2010 -0500

Fix open flags so that logfile won't be truncated each time we open it.

rhbz#608887

Signed-off-by: Ryan O'Hara <rohara at redhat.com>
---
 fence/agents/scsi/fence_scsi.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index 59259cf..992a3eb 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -583,7 +583,7 @@ else {
 ## and redirect STDOUT and STDERR to the logfile.
 ##
 if (defined $opt_f) {
-    open (LOG, ">$opt_f") or die "$!\n";
+    open (LOG, >">$opt_f") or die "$!\n";
     open (STDOUT, ">&LOG");
     open (STDERR, ">&LOG");
 }


More information about the cluster-commits mailing list