+// Requesting a mirror list. Yum bombs out completely if a repository
+// is (even temporarily) unavailable, so if CoBlitz is down, provide a
+// few more options. Make sure that gpgcheck remains enabled. Last
+// chance option is ourselves so that yum never fails.
+if (isset($_REQUEST['mirrorlist']) &&
+ isset($_REQUEST['repo']) &&
+ isset($_REQUEST['releasever'])) {
+ $mirrors = array("http://coblitz.codeen.org/coblitz.planet-lab.org/pub/fedora/linux",
+ "http://fedora.gtlib.cc.gatech.edu/pub/fedora.redhat/linux",
+ "http://download.fedoraproject.org/pub/fedora/linux",
+ "http://mirrors.kernel.org/fedora");
+ #"ftp://rpmfind.net/linux/fedora", still uses the old style of directory hierarchy
+ $releasever = $_REQUEST['releasever'];
+ switch ($_REQUEST['repo']) {
+ case "base":
+ if ( intval($releasever) >= 7 )
+ {
+ foreach ($mirrors as $mirror) {
+ echo "$mirror/releases/$releasever/Everything/\$ARCH/os/\n";
+ }
+
+ } else {
+ foreach ($mirrors as $mirror) {
+ echo "$mirror/core/$releasever/\$ARCH/os/\n";
+ }
+ }
+ break;
+ case "updates":
+ if ( intval($releasever) >= 7 )
+ {
+ foreach ($mirrors as $mirror) {
+ echo "$mirror/updates/$releasever/\$ARCH/\n";
+ }
+
+ } else {
+ foreach ($mirrors as $mirror) {
+ echo "$mirror/core/updates/$releasever/\$ARCH/\n";
+ }
+ }
+ break;
+ }
+
+ // Always list ourselves last
+ echo "https://$PLC_BOOT_HOST/install-rpms/planetlab/\n";
+ exit;
+}
+
+// Requesting yum.conf. See above for the mirrorlist definition.