mirror of
https://github.com/lxc/lxc-templates.git
synced 2025-02-08 03:20:11 +00:00
Merge pull request #58 from terceiro/new-architectures
lxc-debian: improve detection of official architectures
This commit is contained in:
commit
52cd46def4
@ -786,18 +786,22 @@ if [ "$arch" = "x86_64" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
testing_release_file=${DEBIAN_MIRROR}/dists/testing/main/binary-${arch}/Release
|
release_file=${DEBIAN_MIRROR}/dists/${release}/main/binary-${arch}/Release
|
||||||
if ! wget -q -O /dev/null "${testing_release_file}"; then
|
if ! wget -q -O /dev/null "${release_file}"; then
|
||||||
echo "${arch} does not look like a release architecture, trying debian ports"
|
if [ "${release}" = unstable ] || [ "${release}" = sid ]; then
|
||||||
# non-release architecture; assume debian-ports architecture
|
echo "${arch}/${release} not available on mirror, trying debian ports"
|
||||||
if [ "${MIRROR}" = "${DEBIAN_MIRROR}" ]; then
|
# non-release architecture; assume debian-ports architecture
|
||||||
MIRROR="${DEBIAN_PORTS_MIRROR}"
|
if [ "${MIRROR}" = "${DEBIAN_MIRROR}" ]; then
|
||||||
|
MIRROR="${DEBIAN_PORTS_MIRROR}"
|
||||||
|
fi
|
||||||
|
if [ "${KEYRING}" = "${DEBIAN_ARCHIVE_KEYRING}" ]; then
|
||||||
|
KEYRING="${DEBIAN_PORTS_ARCHIVE_KEYRING}"
|
||||||
|
fi
|
||||||
|
packages="debian-ports-archive-keyring,${packages}"
|
||||||
|
else
|
||||||
|
echo "Error: ${arch}/${release} not available on mirror ${DEBIAN_MIRROR}"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ "${KEYRING}" = "${DEBIAN_ARCHIVE_KEYRING}" ]; then
|
|
||||||
KEYRING="${DEBIAN_PORTS_ARCHIVE_KEYRING}"
|
|
||||||
fi
|
|
||||||
packages="debian-ports-archive-keyring,${packages}"
|
|
||||||
release="${release:-unstable}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$interpreter" = "" ] ; then
|
if [ "$interpreter" = "" ] ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user