diff --git a/openwrt/scripts/download.pl b/openwrt/scripts/download.pl index 009ed3b689..e7c7ee32e6 100755 --- a/openwrt/scripts/download.pl +++ b/openwrt/scripts/download.pl @@ -43,9 +43,10 @@ sub download cleanup(); return; } + $? = 0; my $sum = `cat "$target/$filename.md5sum"`; - $sum =~ /^(\w+)\s+/ or die "Could not generate md5sum\n"; + $sum =~ /^(\w+)\s*/ or die "Could not generate md5sum\n"; $sum = $1; if (($md5sum =~ /\w{32}/) and ($sum ne $md5sum)) {