From db2daaa923923feb69ef5fb767a00fa6d340cf9e Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 28 Jun 2009 16:37:18 +0200 Subject: [PATCH] dsa-check-raid-aacraid: tmp directory in /tmp, unlink UcliEvt.log so tmpdir cleanup doesn't fail. --- dsa-nagios-checks/checks/dsa-check-raid-aacraid | 5 ++++- dsa-nagios-checks/debian/changelog | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dsa-nagios-checks/checks/dsa-check-raid-aacraid b/dsa-nagios-checks/checks/dsa-check-raid-aacraid index 0b82c47..40e9a25 100755 --- a/dsa-nagios-checks/checks/dsa-check-raid-aacraid +++ b/dsa-nagios-checks/checks/dsa-check-raid-aacraid @@ -59,7 +59,7 @@ sub record($) { } # arcconf puts crap into a $PWD/UcliEvt.log file. -my $dir = tempdir( "check-aacraid-XXXXXXX", CLEANUP => 1 ); +my $dir = tempdir( "/tmp/check-aacraid-XXXXXXX", CLEANUP => 1 ); chdir ($dir) or die ("Cannot chdir $dir: $!\n"); my $ctrl = 1; @@ -136,5 +136,8 @@ while ($ctrl <= $numcontrollers) { $ctrl++; }; +if ( -e 'UcliEvt.log' ) { + unlink('UcliEvt.log') or die ("Cannot unlink UcliEvt.log: $!\n"); +} print "$EXITCODE: ", join(" --- ", @resultstr), "\n"; exit $CODE{$EXITCODE}; diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index e926bb3..c283f7a 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -1,3 +1,11 @@ +dsa-nagios-checks (78) stable; urgency=low + + * dsa-check-raid-aacraid: tmp directory in /tmp, + * dsa-check-raid-aacraid: unlink UcliEvt.log so tmpdir cleanup + doesn't fail. + + -- Peter Palfrader Sun, 28 Jun 2009 16:36:39 +0200 + dsa-nagios-checks (77) stable; urgency=low * Add checks/dsa-check-raid-aacraid. -- 2.20.1