Code

Error code depending on number of files generated
authorTon Voon <tonvoon@users.sourceforge.net>
Mon, 24 Mar 2003 02:19:22 +0000 (02:19 +0000)
committerTon Voon <tonvoon@users.sourceforge.net>
Mon, 24 Mar 2003 02:19:22 +0000 (02:19 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@454 f882894a-f735-0410-b71e-b25c423dba1c

tools/sfsnapshot

index 7b44adcc90c8ba6cd2e882b9a4169b469b667cb2..8e82f298254377ef38d5905de592c109b6fa45dc 100755 (executable)
@@ -81,3 +81,8 @@ EOF
 
 rm -f $files
 
+# Work out success or failure
+expected=$(($# + 1))
+set -- $files
+[[ $# -ne $expected ]] && die "Expected $expected, got $#"
+exit 0