Skip to content

Commit

Permalink
Set exit code to 0 for sa2 script shell.
Browse files Browse the repository at this point in the history
Mail from Peter Schiffer ([email protected]) 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,
  • Loading branch information
sysstat committed Mar 15, 2012
1 parent bf105c4 commit 2fb0d3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Changes:

xxxx/xx/xx: Version 10.0.5 - Sebastien Godard (sysstat <at> orange.fr)
* [Peter Schiffer]: Set exit code to 0 for sa2 shell script.

2012/03/07: Version 10.0.4 - Sebastien Godard (sysstat <at> orange.fr)
* [Andrey Borzenkov]: Don't take virtual devices into account in
Expand Down
3 changes: 2 additions & 1 deletion sa2.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
# @SA_LIB_DIR@/sa2
# (C) 1999-2011 Sebastien Godard (sysstat <at> orange.fr)
# (C) 1999-2012 Sebastien Godard (sysstat <at> orange.fr)
#
#@(#) @PACKAGE_NAME@-@PACKAGE_VERSION@
#@(#) sa2: Write a daily report
Expand Down Expand Up @@ -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

0 comments on commit 2fb0d3e

Please sign in to comment.