From 039846d10abec909e5a30768dad0b44f361ab685 Mon Sep 17 00:00:00 2001 From: BobM Date: Thu, 31 Mar 2022 11:39:49 -0700 Subject: [PATCH] Change Avail column for destination directory $5 was the wrong column on debian and ubuntu --- apt-mirror | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-mirror b/apt-mirror index b15604d..e5f8ab8 100755 --- a/apt-mirror +++ b/apt-mirror @@ -2171,7 +2171,7 @@ sub mainsub_main_download (my $size_mirror) = $size_output =~ /\A([^:\s]+)/; my $directory = get_variable("mirror_path"); - my $command = "df $directory | awk -F'[^0-9]*' 'NR==2 {print \$5}'"; + my $command = "df $directory | awk -F'[^0-9]*' 'NR==2 {print \$4}'"; (my $directory_size) = format_bytes(`$command`*1000) =~ /\A([^:\s]+)/; if ($directory_size <= $size_mirror) {