$gpgcheck = 0;
}
-echo "# Generated by stock.repo.php\n";
+echo "# Generated by yum.php\n";
echo '# $Id$' . "\n";
echo '# $URL$' . "\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 "# node_id is needed\n";
+ echo "# yum.php expects node_id to be set\n";
echo "# looks like you're running a very old NodeManager...\n";
echo "# bailing out..\n";
exit;
}
-
$node_id = intval($_REQUEST['node_id']);
$nodeflavour=$adm->GetNodeFlavour($node_id);
-$nodefcdistro=$nodeflavour['fcdistro'];
+$fcdistro=$nodeflavour['fcdistro'];
+
+if ( ! isset($_REQUEST['path'])) {
+ echo "# yum.php expect path to be set - bailing out\n";
+ exit;
+ }
+$path = $_REQUEST['path'];
-# try to open /var/www/html/yum/<fcdistro>/yum.myplc.d/stock.repo
-# otherwise use the static version in
-# /var/www/html/yum.legacy/stock.repo
-$fc_name="/var/www/html/yum/" . $fcdistro . "/yum.myplc.d/stock.repo";
-$fb_name="/var/www/html/yum.legacy/stock.repo";
+# try to open /var/www/html/yum/<fcdistro>/<path>
+$fc_name="/var/www/html/yum/" . $fcdistro . "/" . $path;
$fc_contents=file_get_contents($fc_name);
if ($fc_contents) {
- echo "# retrieved " . $fc_name . "\n";
+ echo "#\n";
+ echo "# yum.php has retrieved " . $fc_name . "\n";
+ echo "#\n";
print $fc_contents;
exit;
}
-$fb_contents=file_get_contents($fb_name);
-if ($fb_contents) {
- echo "# retrieved fallback (fcdistro " . $fcdistro " unknown) " . $fb_name . "\n";
- print $fb_contents;
- exit;
- }
-echo "# Could not find any of the following\n";
+echo "#\n";
+echo "# yum.php could not find the following path\n";
echo "# " . $fc_name . "\n";
-echo "# " . $fb_name . "\n";
-echo "# bailing out";
+echo "# bailing out\n";