From: Peter Palfrader Date: Sun, 28 Jun 2009 14:37:18 +0000 (+0200) Subject: dsa-check-raid-aacraid: tmp directory in /tmp, unlink UcliEvt.log so tmpdir cleanup... X-Git-Url: https://wiki.adam-barratt.org.uk/gitweb/?a=commitdiff_plain;h=db2daaa923923feb69ef5fb767a00fa6d340cf9e;p=mirror%2Fdsa-nagios.git dsa-check-raid-aacraid: tmp directory in /tmp, unlink UcliEvt.log so tmpdir cleanup doesn't fail. --- 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.