Commit 76aefec7 authored by Mike Hibler's avatar Mike Hibler
Browse files

Need to run a different script for an ops fetch.

parent 763c6aca
......@@ -376,14 +376,19 @@ sub GetRPMFile($$$$$$$$)
}
}
my $www = "https://$wgetserver";
if ($wgetserver =~ /^users/) {
$www .= "/spewrpmtar";
} else {
$www .= "/spewrpmtar.php3";
}
#
# Okay, run wget with the proper arguments.
#
my $cmd = "wget -nv -O --no-check-certificate $copyfile ".
my $cmd = "wget -nv -O $copyfile ".
"--no-check-certificate ".
($debug ? "--server-response " : "") .
"'${www}/spewrpmtar.php3".
"?nodeid=${nodeid}&file=${rpm}&key=${keyhash}".
"'${www}?nodeid=${nodeid}&file=${rpm}&key=${keyhash}" .
(defined($oldstamp) ? "&stamp=$oldstamp" : "") .
(defined($oldmd5) ? "&md5=$oldmd5" : "") .
"'";
......@@ -412,7 +417,7 @@ sub GetRPMFile($$$$$$$$)
}
if (! close(WGET)) {
if ($?) {
fatal("Could not retrieve $rpm from $www")
fatal("Could not retrieve $rpm from $wgetserver")
if (!$nochange);
# Otherwise, not modifed.
print STDOUT "Timestamp for $rpm unchanged!\n"
......
......@@ -592,6 +592,11 @@ sub GetTarFile($$$$$$$$)
}
}
my $www = "https://$wgetserver";
if ($wgetserver =~ /^users/) {
$www .= "/spewrpmtar";
} else {
$www .= "/spewrpmtar.php3";
}
#
# Okay, run wget with the proper arguments.
......@@ -599,8 +604,7 @@ sub GetTarFile($$$$$$$$)
my $cmd = "wget -nv -O $copyfile ".
"--no-check-certificate ".
($debug ? "--server-response " : "") .
"'${www}/spewrpmtar.php3".
"?nodeid=${nodeid}&file=${tarfile}&key=${keyhash}" .
"'${www}?nodeid=${nodeid}&file=${tarfile}&key=${keyhash}" .
(defined($oldstamp) ? "&stamp=$oldstamp" : "") .
(defined($oldmd5) ? "&md5=$oldmd5" : "") .
"'";
......@@ -629,7 +633,7 @@ sub GetTarFile($$$$$$$$)
}
if (! close(WGET)) {
if ($?) {
fatal("Could not retrieve $tarfile from $www")
fatal("Could not retrieve $tarfile from $wgetserver")
if (!$nochange);
# Otherwise, not modifed.
print STDOUT "Timestamp for $tarfile unchanged!\n"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment