lxc/lxc-0.8.0-fedora-template.patch

29 lines
1.1 KiB
Diff

commit 29e18143a07ffab7e85cb8db4dc39d394f0c6ea0
Author: Maximilian Seesslen <mes@seesslen.net>
Date: Fri Jan 4 16:36:07 2013 +0100
fixed RELEASE_URL for fedora releases higher than 16
The Url for the fedora-release RPM changed in release 17.
Signed-off-by: Maximilian Seesslen <mes@seesslen.net>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in
index 366e776..684bb9c 100644
--- a/templates/lxc-fedora.in
+++ b/templates/lxc-fedora.in
@@ -149,7 +149,11 @@ download_fedora()
echo "Failed to get a mirror"
continue
fi
- RELEASE_URL="$MIRROR_URL/Packages/fedora-release-$release-1.noarch.rpm"
+ if [ "$release" -gt "16" ]; then
+ RELEASE_URL="$MIRROR_URL/Packages/f/fedora-release-$release-1.noarch.rpm"
+ else
+ RELEASE_URL="$MIRROR_URL/Packages/fedora-release-$release-1.noarch.rpm"
+ fi
echo "Fetching from $RELEASE_URL"
curl -f "$RELEASE_URL" > $INSTALL_ROOT/fedora-release-$release.noarch.rpm
if [ $? -ne 0 ]; then