X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=nodeconfig%2Fyum%2Fmyplc.repo.php;h=11b48fa35b8a7e7b3a920380bb61b492dc7ac6c9;hb=69b386580192c18271fbcccc73821812a8dd3bfa;hp=a0e8d28ae7855659532760618e5f928c28ee3a55;hpb=296b3d4af2f78b2f8c401748685b6cdf1b8dfcd7;p=nodeimage.git diff --git a/nodeconfig/yum/myplc.repo.php b/nodeconfig/yum/myplc.repo.php index a0e8d28..11b48fa 100644 --- a/nodeconfig/yum/myplc.repo.php +++ b/nodeconfig/yum/myplc.repo.php @@ -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