summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2005-09-24 08:44:00 +0000
committerMarc Espie <espie@cvs.openbsd.org>2005-09-24 08:44:00 +0000
commit6af52ad6772b24f088f2323521cc840c2633d538 (patch)
treea151aef7f40abb00315c9f63b034aa17b37b2113 /usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
parent38c76b560c0736c6e91222638cd609ca7479f9b5 (diff)
Allows FETCH_CMD to replace ftp.
Note that, for simplicity, FETCH_CMD must be a single command with a full path. Use a script if you must.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackageLocator.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageLocator.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
index ceb8202898e..2cc3bb9294f 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageLocator.pm,v 1.40 2005/09/19 10:15:01 espie Exp $
+# $OpenBSD: PackageLocator.pm,v 1.41 2005/09/24 08:43:59 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -471,7 +471,8 @@ our %distant = ();
sub grab_object
{
my ($self, $object) = @_;
- exec {"/usr/bin/ftp"}
+ my $ftp = defined $ENV{'FETCH_CMD'} ? $ENV{'FETCH_CMD'} : "/usr/bin/ftp";
+ exec {$ftp}
"ftp",
"-o",
"-", $self->{baseurl}.$object->{name}