From 6af52ad6772b24f088f2323521cc840c2633d538 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Sat, 24 Sep 2005 08:44:00 +0000 Subject: 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. --- usr.sbin/pkg_add/OpenBSD/PackageLocator.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.sbin/pkg_add/OpenBSD/PackageLocator.pm') 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 # @@ -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} -- cgit v1.2.3