Index: /branches/eam_branches/ipp-20230313/ippScripts/scripts/addstar_run.pl
===================================================================
--- /branches/eam_branches/ipp-20230313/ippScripts/scripts/addstar_run.pl	(revision 42754)
+++ /branches/eam_branches/ipp-20230313/ippScripts/scripts/addstar_run.pl	(revision 42755)
@@ -41,6 +41,6 @@
 
 my ( $add_id, $camera, $stage, $stage_id, $outroot, $stageroot, $dbname, $reduction,
-     $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $minidvodb_host, $image_only, $verbose,
-     $no_update, $no_op, $redirect, $save_temps, $dvodbhost);
+     $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $image_only, $verbose,
+     $no_update, $no_op, $redirect, $save_temps, $addrun_host);
 GetOptions(
     'add_id=s'          => \$add_id, # Camtool identifier
@@ -62,10 +62,10 @@
     'redirect-output'   => \$redirect,
     'save-temps'        => \$save_temps, # Save temporary files?
-    'dvodbhost|w=s' => \$dvodbhost, # miniDVO database group
+    'addrun_host|w=s' => \$addrun_host, # miniDVO database host
     ) or pod2usage( 2 );
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage(
-          -msg => "Required options: --add_id --camera --outroot --dvodb --stageroot --stage --dbname --dvodbhost",
+          -msg => "Required options: --add_id --camera --outroot --dvodb --stageroot --stage --dbname --addrun_host",
           -exitval => 3,
           ) unless
@@ -76,5 +76,5 @@
     defined $dvodb and
     defined $dbname and
-    defined $dvodbhost and
+    defined $addrun_host and
     defined $camera;
 
@@ -173,5 +173,5 @@
     $minidvodb_path = $comp->{minidvodb_path};
     $minidvodb_name = $comp->{minidvodb_name};
-    $minidvodb_host = $comp->{minidvodb_host};
+    $addrun_host = $comp->{addrun_host};
 
     if (!defined($minidvodb_path)) { &my_die("Unable to parse minidvodb_path", $add_id, $PS_EXIT_PROG_ERROR); }
@@ -260,5 +260,5 @@
     $fpaCommand .= " -dvodb_path $minidvodb_path" if defined $minidvodb_path;
     $fpaCommand .= " -minidvodb_name $minidvodb_name" if defined $minidvodb_name;
-    $fpaCommand .= " -minidvodb_host $dvodbhost" if defined $dvodbhost;
+    $fpaCommand .= " -addrun_host $addrun_host" if defined $addrun_host;
     $fpaCommand .= " -dbname $dbname" if defined $dbname;
 
@@ -295,5 +295,5 @@
         $command .= (" -dtime_addstar " . ((DateTime->now->mjd - $mjd_start) * 86400));
         $command .= " -minidvodb_name $minidvodb_name" if defined $minidvodb_name; # dont think we want it recorded (not sure)
-        $command .= " -minidvodb_host $dvodbhost" if defined $dvodbhost; # dont think we want it recorded (not sure)
+        $command .= " -addrun_host $addrun_host" if defined $addrun_host; 
 	$command .= " -stage_extra1 $stage_extra1" if defined $stage_extra1;
         $command .= " -dbname $dbname" if defined $dbname;
Index: /branches/eam_branches/ipp-20230313/ippScripts/scripts/dist_bundle.pl
===================================================================
--- /branches/eam_branches/ipp-20230313/ippScripts/scripts/dist_bundle.pl	(revision 42754)
+++ /branches/eam_branches/ipp-20230313/ippScripts/scripts/dist_bundle.pl	(revision 42755)
@@ -25,4 +25,9 @@
 
 my $ipprc = PS::IPP::Config->new(); # IPP configuration
+
+# we can record the location an appropriate magic.mdc file for the file command 
+my $file_magic = "$ENV{PSCONFDIR}/$ENV{PSCONFIG}/etc/compress.mgc";
+### TEST print "magic: $file_magic\n";
+### TEST system ("file -m $file_magic o60523g0045o.2132764.wrp.2688740.skycell.1566.004.pswarp.mdc");
 
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
@@ -682,5 +687,6 @@
     my $mdc_compressed;
     {
-        my $command = "$file_cmd $resolved";
+        my $command = "$file_cmd -m $file_magic $resolved";
+#        my $command = "$file_cmd $resolved";
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
             run(command => $command, verbose => $verbose);
Index: /branches/eam_branches/ipp-20230313/ippScripts/scripts/minidvodb_premerge.pl
===================================================================
--- /branches/eam_branches/ipp-20230313/ippScripts/scripts/minidvodb_premerge.pl	(revision 42754)
+++ /branches/eam_branches/ipp-20230313/ippScripts/scripts/minidvodb_premerge.pl	(revision 42755)
@@ -47,20 +47,21 @@
 }
 
-my ( $minidvodb, $minidvodb_id, $minidvodb_group, $camera, $dbname,$verbose, $logfile, $no_op, $redirect, $save_temps);
+my ( $minidvodb, $minidvodb_id, $minidvodb_group, $minidvodb_host, $camera, $dbname,$verbose, $logfile, $no_op, $redirect, $save_temps);
 GetOptions(
-    'minidvodb|w=s'     => \$minidvodb, #minidvodb database
-    'minidvodb_id|w=s'  => \$minidvodb_id, #minidvodb_id
-    'minidvodb_group|w=s'  => \$minidvodb_group, #minidvodb_id
-    'camera|c=s'        => \$camera, # Camera
-    'dbname|d=s'        => \$dbname, # Database name
-    'verbose'           => \$verbose,   # Print to stdout
-    'no-op'             => \$no_op, # Don't do any operations?
-    'logfile=s'         => \$logfile,
-    'save-temps'        => \$save_temps, # Save temporary files?
+    'minidvodb|w=s'        => \$minidvodb, #minidvodb database
+    'minidvodb_id|w=s'     => \$minidvodb_id, #minidvodb_id
+    'minidvodb_group|w=s'  => \$minidvodb_group, #minidvodb_group
+    'minidvodb_host|w=s'   => \$minidvodb_host, #minidvodb_host
+    'camera|c=s'           => \$camera, # Camera
+    'dbname|d=s'           => \$dbname, # Database name
+    'verbose'              => \$verbose,   # Print to stdout
+    'no-op'                => \$no_op, # Don't do any operations?
+    'logfile=s'            => \$logfile,
+    'save-temps'           => \$save_temps, # Save temporary files?
     ) or pod2usage( 2 );
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage(
-          -msg => "Required options: --minidvodb --minidvodb_id -- minidvodb_group --camera",
+          -msg => "Required options: --minidvodb --minidvodb_id --minidvodb_group --minidvodb_host --camera ",
           -exitval => 3,
           ) unless
@@ -68,4 +69,5 @@
     defined $minidvodb_id and
     defined $minidvodb_group and
+    defined $minidvodb_host and
     defined $camera;
 
Index: /branches/eam_branches/ipp-20230313/ippScripts/scripts/nightly_science.pl
===================================================================
--- /branches/eam_branches/ipp-20230313/ippScripts/scripts/nightly_science.pl	(revision 42754)
+++ /branches/eam_branches/ipp-20230313/ippScripts/scripts/nightly_science.pl	(revision 42755)
@@ -1844,6 +1844,6 @@
                     ($comment_hash_good{$this_comment} == $this_exp_id)) {
                     push @keep_warps, $this_warp;
-                    my $this_date  = ${ $this_warp }[2];
-                    my $chunk_name  = ${ $this_warp }[6];
+                    $this_date  = ${ $this_warp }[2];
+                    $chunk_name  = ${ $this_warp }[6];
 
 	            #do not continue if you encounter exposures that finished cam stage but have not yet continued to warp (i.e. stuck in between stages)
@@ -2146,4 +2146,6 @@
     my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($date,$target);
     my ($year,$month,$day,$hour,$min,$sec);
+    my $this_date = undef;
+    my $chunk_name = undef;
 
     my $db = init_gpc_db();
@@ -2248,6 +2250,6 @@
                     ($comment_hash_good{$this_comment} == $this_exp_id)) {
                     push @keep_warps, $this_warp;
-                    my $this_date  = ${ $this_warp }[2];
-                    my $chunk_name  = ${ $this_warp }[6];
+                    $this_date  = ${ $this_warp }[2];
+                    $chunk_name  = ${ $this_warp }[6];
 
 	            #do not continue if you encounter exposures that finished cam stage but have not yet continued to warp (i.e. stuck in between stages)
