Index: branches/pap/ippScripts/scripts/dqstats_bundle.pl
===================================================================
--- branches/pap/ippScripts/scripts/dqstats_bundle.pl	(revision 27708)
+++ branches/pap/ippScripts/scripts/dqstats_bundle.pl	(revision 28003)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
@@ -37,30 +38,30 @@
 my ( $dqstats_id, $camera, $uri, $dbname, $verbose, $no_update, $no_op, $redirect, $save_temps);
 GetOptions(
-	   'dqstats_id=s'    => \$dqstats_id, # dqstatsrun ID
-	   'camera|c=s'      => \$camera,  # camera
-	   'dbname|d=s'      => \$dbname,  # database name
-	   'uri=s'           => \$uri, # output file destination
-	   'verbose'         => \$verbose, # print to stdout
-	   'no-update'       => \$no_update, # Update the database
-	   'no-op'           => \$no_op,   # don't do the operations
-	   'redirect-output' => \$redirect, 
-	   'save-temps'      => \$save_temps, # save temporary files
-	   ) or pod2usage( 2 );
+           'dqstats_id=s'    => \$dqstats_id, # dqstatsrun ID
+           'camera|c=s'      => \$camera,  # camera
+           'dbname|d=s'      => \$dbname,  # database name
+           'uri=s'           => \$uri, # output file destination
+           'verbose'         => \$verbose, # print to stdout
+           'no-update'       => \$no_update, # Update the database
+           'no-op'           => \$no_op,   # don't do the operations
+           'redirect-output' => \$redirect,
+           'save-temps'      => \$save_temps, # save temporary files
+           ) or pod2usage( 2 );
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage( -msg => "Required options --dqstats_id --camera",
-	   -exitval => 3,
-	   ) unless
+           -exitval => 3,
+           ) unless
     defined $dqstats_id and
     defined $camera;
 
-my $ipprc = PS::IPP::Config->new( $camera ) 
+my $ipprc = PS::IPP::Config->new( $camera )
     or my_die( "Unable to set up", $dqstats_id, $PS_EXIT_CONFIG_ERROR ); # IPP config
-#my $logDest = $ipprc->filename("LOG.EXP", $uri) 
+#my $logDest = $ipprc->filename("LOG.EXP", $uri)
 #    or my_die("Missing entry from camera config", $dqstats_id, $PS_EXIT_CONFIG_ERROR);
 
 if ($redirect) {
-#    $ipprc->redirect_output($logDest) 
-#	or my_die( "Unable to redirect output", $dqstats_id, $PS_EXIT_SYS_ERROR );
+#    $ipprc->redirect_output($logDest)
+#       or my_die( "Unable to redirect output", $dqstats_id, $PS_EXIT_SYS_ERROR );
     print "\n\n";
     print "Starting script $0 on $host\n\n";
@@ -84,16 +85,16 @@
 unless ($no_op) {
     # This bit needs to make the bundle.
-    
+
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $bundle_command, verbose => $verbose);
+        run(command => $bundle_command, verbose => $verbose);
     unless ($success) {
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to create the bundle.: $error_code", $dqstats_id, $error_code);
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die("Unable to create the bundle.: $error_code", $dqstats_id, $error_code);
     }
-    
+
     # Parse stdout_buf to get output file name
     ## Begin partial
     my ($tempFile, $tempName) = tempfile( "/tmp/dqstats.XXXX",
-					  UNLINK => !$save_temps, SUFFIX => 'dsin' );
+                                          UNLINK => !$save_temps, SUFFIX => 'dsin' );
     print $tempFile $uri . '|||notset' . "\n";
 
@@ -102,10 +103,10 @@
     # It can't be that simple, can it? This should probably add a fault on failure.
     ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $register_cmd, verbose => $verbose);
+        run(command => $register_cmd, verbose => $verbose);
     unless ($success) {
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to register the bundle.: $error_code", $dqstats_id, $error_code);
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die("Unable to register the bundle.: $error_code", $dqstats_id, $error_code);
     }
-    
+
     # We no longer need the file generated by dqstatstool.
     unlink($uri);
@@ -118,9 +119,9 @@
     # This bit needs to set the database state to full
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $update_command, verbose => $verbose);
+        run(command => $update_command, verbose => $verbose);
     unless ($success) {
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	warn("Unable to add result to database: $error_code\n");
-	exit($error_code);
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        warn("Unable to add result to database: $error_code\n");
+        exit($error_code);
     }
 } else {
@@ -139,5 +140,5 @@
     carp($msg);
     if (defined $dqstats_id and not $no_update) {
-	# There is no fault handling, which may be a mistake. This is where a fault coding would be.
+        # There is no fault handling, which may be a mistake. This is where a fault coding would be.
 #         my $command = "$addtool -add_id $add_id";
 #         $command .= " -addprocessedexp";
