]> git.decadent.org.uk Git - dak.git/blobdiff - tools/debianqueued-0.9/debianqueued
debianqueued: set LC_ALL in the environment
[dak.git] / tools / debianqueued-0.9 / debianqueued
index 0015867ab65d4160b8552cbe731b8d2684758185..d99c8c878d96a974895fb4703827c20091a3d162 100755 (executable)
@@ -14,6 +14,7 @@
 #
 
 require 5.002;
+no lib '.';
 use strict;
 use POSIX;
 use POSIX qw( strftime sys_stat_h sys_wait_h signal_h );
@@ -26,6 +27,7 @@ use File::Copy;
 use Digest::MD5;
 
 setlocale(&POSIX::LC_ALL, "C");
+$ENV{"LC_ALL"} = "C";
 
 # ---------------------------------------------------------------------------
 #                                                              configuration
@@ -919,9 +921,7 @@ outer_loop: while (<CHANGES>) {
     return;
   } ## end if ( $retries > 0 && (...
 
-  if ( $conf::upload_method eq "ftp" ) {
-    return if !ftp_open();
-  }
+  return if !ftp_open();
 
   # check if the job is already present on target
   # (moved to here, to avoid bothering target as long as there are errors in
@@ -1067,6 +1067,8 @@ sub process_dak_commands {
   }
   msg("log,mail", "(PGP/GnuPG signature by $signator)\n");
 
+  return if !ftp_open();
+
   # check target
   my @filenames = ($commands);
   if (my $ls_l = is_on_target($commands, @filenames)) {
@@ -1932,6 +1934,7 @@ sub send_status() {
 # open FTP connection to target host if not already open
 #
 sub ftp_open() {
+  return 1 unless $conf::upload_method eq "ftp";
 
   if ($main::FTP_chan) {