From 8aaf74fb33415635e1a656c0bcc75b14a45079f0 Mon Sep 17 00:00:00 2001
From: Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Date: Thu, 24 Apr 2008 07:47:51 +0000
Subject: [PATCH] simpler heuristic, same as for creating bootcd - less code,
 fewer bugs

---
 source/steps/InstallBootstrapFS.py | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/source/steps/InstallBootstrapFS.py b/source/steps/InstallBootstrapFS.py
index 088b68d..e04f930 100644
--- a/source/steps/InstallBootstrapFS.py
+++ b/source/steps/InstallBootstrapFS.py
@@ -106,18 +106,11 @@ def Run( vars, log ):
     # see also GetBootMedium in PLCAPI that does similar things
     # figuring the default node family:
     # (1) look at /etc/planetlab/nodefamily on the bootcd
-    # (2) otherwise use GetPlcRelease()
-    # (3) if everything else fails, set to planetlab-i386
+    # (2) if that fails, set to planetlab-i386
     try:
-        (pldistro,arch) = file("/etc/planetlab/nodefamily").read().split("-")
+        (pldistro,arch) = file("/etc/planetlab/nodefamily").read().strip().split("-")
     except:
-        # fetch the pldistro our myplc was built upon
-        try:
-            plc_release = BootAPI.call_api_function (vars, "GetPlcRelease",())
-            pldistro = plc_release ['build']['planetlab-distro']
-            arch = plc_release ['build']['target-arch']
-        except:
-            (pldistro,arch) = ("planetlab","i386")
+        (pldistro,arch) = ("planetlab","i386")
 
     # scan nodegroupnames - temporary, as most of this nodegroup-based info 
     # should be more adequately defined in the nodes data model
-- 
2.47.0