From: Sebastien Godard Date: Thu, 15 Mar 2012 15:49:36 +0000 (+0100) Subject: Set exit code to 0 for sa2 script shell. X-Git-Tag: v10.0.5~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2fb0d3e4237d85277791435d1b913c008b428992;p=sysstat Set exit code to 0 for sa2 script shell. Mail from Peter Schiffer (pschiffe@redhat.com) 13/03/2012 Hello, we have found minor issue in sysstat. Exit code of sa2 doesn't have to be 0 even if everything is OK. This is because the last operation there is precautionary rmdir which may not have anything to do: $ sudo sh /usr/lib64/sa/sa2 -A $ echo $? 1 I'm attaching simple patch adding "exit 0" at the end of sa1 and sa2. What do you think? Thanks, --- diff --git a/CHANGES b/CHANGES index 6035bcc..d5b8240 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ Changes: xxxx/xx/xx: Version 10.0.5 - Sebastien Godard (sysstat orange.fr) + * [Peter Schiffer]: Set exit code to 0 for sa2 shell script. 2012/03/07: Version 10.0.4 - Sebastien Godard (sysstat orange.fr) * [Andrey Borzenkov]: Don't take virtual devices into account in diff --git a/sa2.in b/sa2.in index 325edb4..9f5fa5a 100644 --- a/sa2.in +++ b/sa2.in @@ -1,6 +1,6 @@ #!/bin/sh # @SA_LIB_DIR@/sa2 -# (C) 1999-2011 Sebastien Godard (sysstat orange.fr) +# (C) 1999-2012 Sebastien Godard (sysstat orange.fr) # #@(#) @PACKAGE_NAME@-@PACKAGE_VERSION@ #@(#) sa2: Write a daily report @@ -60,4 +60,5 @@ for f in `find ${DDIR} \( -name 'sar??' -o -name 'sa??' \) -type l`; do done cd ${DDIR} rmdir [0-9]????? > /dev/null 2>&1 +exit 0