[Nagiosplug-devel] [ nagiosplug-Bugs-2104167 ] errorfile does not get delted upon succesfull completion

SourceForge.net noreply at sourceforge.net
Wed Sep 10 18:35:13 UTC 2008


Bugs item #2104167, was opened at 2008-09-10 11:27
Message generated for change (Comment added) made by rkomorn
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2104167&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: snapshot tarball
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Romain Komorn (rkomorn)
Assigned to: Nobody/Anonymous (nobody)
Summary: errorfile does not get delted upon succesfull completion

Initial Comment:

At the beginning of version 2.0 of the contrib/check_mssql.sh script, the following file gets created:

Line 67: errorfile=`$mktempcmd /tmp/$hostname.XXXXXX`

However, upon "successful" completion, the cleanup command issued is:

Line 95: $rmcmd -f $tmpfile $resultfile;

This means that the $errorfile created above isn't properly cleaned up, and quickly starts to clutter up /tmp .

The other cleanup command,

Line 102: $rmcmd -f $tmpfile $resultfile $errorfile

never gets executed, due to the fact that the script exits at the end of the if/else block starting with:

Line 88: if [ "$resultfileln" == "2" ]; then

This appears to still be the case in the snapshot at http://nagiosplug.sourceforge.net/snapshot/nagios-plugins-trunk-200809101200.tar.gz

----------------------------------------------------------------------

>Comment By: Romain Komorn (rkomorn)
Date: 2008-09-10 11:35

Message:
File Added: check_mssql.sh-errorfile_deletion-patch.txt

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2104167&group_id=29880




More information about the Nagiosplugin-devel mailing list