Subject: Re: Sysinst ftp ignores leading / when ftp'ing binaries
To: NetBSD Tech-Install <tech-install@netbsd.org>
From: Alan Barrett <apb@iafrica.com>
List: tech-install
Date: 05/05/1999 14:41:34
> > Unfortunately, sysinst ran a command similar to 'ftp
> > ftp://mike:secret@host.local.com/usr/archive/NetBSD-1.4/ ' which did
> > not work because the ftp program used a path relative to my home
> > directory instead of /.
>
> This was mentioned on one of the other lists recently.  I
> _think_ you need to put an escaped '/' at the start.  Try
> "%2Fusr/archive/NetBSD-1.4" instead...

Sorry, that won't work either.  If you type

        %2Fusr/archive/NetBSD-1.4

at the ftp directory prompt in sysinst, it will assume that the "%" is a
literal character in the directory name, and will happily encode the "%"
to "%25", giving a useless URL like this:

        ftp://user:password@host/%252Fusr/archive/NetBSD-1.4/blahblah

Recent bug fixes to make ftp interpret URLs properly acording to the
rules in RFC 1738, and to make sysinst encode unsafe characters using
%hex escapes, have conspired together to make this problem.

I have just sent a PR (don't yet know the number) with a patch that will
allow you to type

        /usr/archive/NetBSD-1.4

at the ftp directory prompt in sysinst, and have sysinst pass ftp an URL
like this:

        ftp://user:password@host/%2Fusr/archive/NetBSD-1.4/blahblah

--apb (Alan Barrett)