3 // part of yum config on nodes
6 // Copyright (C) 2008 INRIA
9 // For PLC_NAME and PLC_BOOT_HOST
10 include('plc_config.php');
13 $PLC_BOOT_HOST = PLC_BOOT_HOST;
15 // Get admin API handle
16 require_once 'plc_api.php';
19 if (isset($_REQUEST['gpgcheck'])) {
20 $gpgcheck = $_REQUEST['gpgcheck'];
25 echo "# Generated by myplc.repo.php\n";
26 # we assume the node is not so old that it would not send node_id
28 if ( ! isset($_REQUEST['node_id'])) {
29 echo "# node_id is needed\n";
30 echo "# looks like you're running a very old NodeManager...\n";
31 echo "# bailing out..\n";
35 $node_id = intval($_REQUEST['node_id']);
36 $nodeflavour=$adm->GetNodeFlavour($node_id);
37 $nodefamily=$nodeflavour['nodefamily'];
39 $topdir=$_SERVER['DOCUMENT_ROOT'] . "/install-rpms/" . $nodefamily;
40 # Thierry : starting with fedora 12, yum complains about not being able to
41 # verify the certificates; as we're using gpgcheck on top of the rest,
42 # it's safe to use http only
43 $topurl="http://$PLC_BOOT_HOST" . "/install-rpms/" . $nodefamily;
45 if ( is_dir (realpath($topdir))) {
46 echo "# This directory was checked to exist on the server-side\n";
48 echo "# WARNING: plc-side yum repo $topdir NOT FOUND !!\n";
52 $repo_name="$PLC_NAME $nodefamily";