summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2020-02-07 11:16:48 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2020-02-07 11:16:48 (GMT)
commitbed14b11e3d3070b92bb66203ae42d9e31393299 (patch) (side-by-side diff)
tree81207427dca441f10e72fb42581611ae00336fe4
parent507ae64c3e886b82435cbc963594ed5e2af3458f (diff)
downloadslackupgrade-bed14b11e3d3070b92bb66203ae42d9e31393299.tar.gz
slackupgrade-bed14b11e3d3070b92bb66203ae42d9e31393299.tar.bz2
Make mirror URL configurable via the environment.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--slackupgrade6
-rw-r--r--slackupgrade.84
2 files changed, 7 insertions, 3 deletions
diff --git a/slackupgrade b/slackupgrade
index ff4d46f..ada387b 100644
--- a/slackupgrade
+++ b/slackupgrade
@@ -23,2 +23,3 @@ set -e
: ${SLACKUPGRADE_PKGDIR:=/var/slackupgrade}
+: ${SLACKUPGRADE_MIRRORS_URL:=https://mirrors.slackware.com/slackware}
# Slackware root directory
@@ -463,6 +464,5 @@ cd $tempdir
-mirrors_url=https://mirrors.slackware.com/slackware
if [ -z "$rooturl" ]; then
dnfunc_init
- if ! $dnfunc index.html $mirrors_url; then
+ if ! $dnfunc index.html $SLACKUPGRADE_MIRRORS_URL; then
abend "exiting"
@@ -477,3 +477,3 @@ if [ -z "$rooturl" ]; then
if [ -n "$new_version" ]; then
- rooturl="$mirrors_url/slackware$ARCH-$new_version"
+ rooturl="$SLACKUPGRADE_MIRRORS_URL/slackware$ARCH-$new_version"
info "using $rooturl as distribution top-level URL"
diff --git a/slackupgrade.8 b/slackupgrade.8
index d58b0e7..ef15eb9 100644
--- a/slackupgrade.8
+++ b/slackupgrade.8
@@ -321,2 +321,6 @@ the temporary storage for downloaded package tarballs. The default is
.TP
+.B SLACKUPGRADE_MIRRORS_URL
+URL of the Slackware mirros site. The default is
+.BR https://mirrors.slackware.com/slackware .
+.TP
.B TMP

Return to:

Send suggestions and report system problems to the System administrator.