eradicate svn keywords
[nodeimage.git] / nodeconfig / yum / myplc.repo.php
index a0e8d28..11b48fa 100644 (file)
@@ -5,8 +5,6 @@
 // Thierry Parmentelat 
 // Copyright (C) 2008 INRIA
 //
-// $Id: myplc.repo.php 9818 2008-07-04 07:54:06Z thierry $
-//
 
 // For PLC_NAME and PLC_BOOT_HOST
 include('plc_config.php');
@@ -24,12 +22,13 @@ if (isset($_REQUEST['gpgcheck'])) {
   $gpgcheck = 0;
 }
 
+echo "# Generated by myplc.repo.php\n";
 # we assume the node is not so old that it would not send node_id
 # get node family
 if ( ! isset($_REQUEST['node_id'])) {
-  echo "# myplc.repo.php: node_id is needed";
-  echo "# looks like you're running a very old NodeManager...";
-  echo "# bailing out..";
+  echo "# node_id is needed\n";
+  echo "# looks like you're running a very old NodeManager...\n";
+  echo "# bailing out..\n";
   exit;
  }
 
@@ -38,15 +37,22 @@ $nodeflavour=$adm->GetNodeFlavour($node_id);
 $nodefamily=$nodeflavour['nodefamily'];
 
 $topdir=$_SERVER['DOCUMENT_ROOT'] . "/install-rpms/" . $nodefamily;
-$topurl="https://$PLC_BOOT_HOST" . "/install-rpms/" . $nodefamily;
-
-if (! is_dir (realpath($topdir))) {
-  echo "# WARNING: plc-side yum repo $topdir NOT FOUND !!";
- }
+# Thierry : starting with fedora 12, yum complains about not being able to 
+# verify the certificates; as we're using gpgcheck on top of the rest, 
+# it's safe to use http only
+$topurl="http://$PLC_BOOT_HOST" . "/install-rpms/" . $nodefamily;
+
+if ( is_dir (realpath($topdir))) {
+  echo "# This directory was checked to exist on the server-side\n";
+} else{
+  echo "# WARNING: plc-side yum repo $topdir NOT FOUND !!\n";
+}
 
+$repo_id=$nodefamily;
+$repo_name="$PLC_NAME $nodefamily";
 echo <<< __PLC_REPO__
-[$id]
-name=$name
+[$repo_id]
+name=$repo_name
 baseurl=$topurl
 gpgcheck=$gpgcheck