1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 16:18:48 -05:00

Searching for sshd and sftp-server will be done first

in the PATH and afterwards in other common locations.
This commit is contained in:
Yang Tse 2007-03-30 10:11:49 +00:00
parent c5586a65c2
commit f55a1c3a6c

View File

@ -56,20 +56,25 @@ do {
my $conffile="curl_sshd_config"; # sshd configuration data
# Search the PATH for sshd. sshd insists on being called with an absolute
# path for some reason.
my $sshd = searchpath("sshd", File::Spec->path());
# Searching for sshd and sftp-server will be done first
# in the PATH and afterwards in other common locations.
my @spath;
push(@spath, File::Spec->path());
push(@spath, @sftppath);
# sshd insists on being called with an absolute path.
my $sshd = searchpath("sshd", @spath);
if (!$sshd) {
print "sshd is not available\n";
print "sshd$exeext not found\n";
exit 1;
}
if ($verbose) {
print STDERR "SSH server found at $sshd\n";
}
my $sftp = searchpath("sftp-server", @sftppath);
my $sftp = searchpath("sftp-server", @spath);
if (!$sftp) {
print "Could not find sftp-server plugin\n";
print "Could not find sftp-server$exeext plugin\n";
exit 1;
}
if ($verbose) {