[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [rhel6-branch] Fixed the setting of LD_LIBRARY_PATH in rescue (#594034)


IIRC there were also some changes to the loader LD_LIBRARY_PATH made around
the same time as this patch, have you checked if we maybe need those changes
too ?



On 05/26/2010 11:27 AM, Martin Gracik wrote:
The hardcoded setting of LD_LIBRARY_PATH was not taking into
consideration if there are lib or lib64 directories,
and was also overwriting everything loader put there before.
Changed to just prepend "/mnt/sysimage" to the directories
we already have in the path.
  rescue.py |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/rescue.py b/rescue.py
index 632d6ad..f360cc7 100644
--- a/rescue.py
+++ b/rescue.py
@@ -411,7 +411,9 @@ def runRescue(anaconda, instClass):

                  # set a library path to use mounted fs
-                os.environ["LD_LIBRARY_PATH"] =  "/lib:/usr/lib:/usr/X11R6/lib:/lib:/mnt/usr/lib:/mnt/sysimage/lib:/mnt/sysimage/usr/lib:/mnt/sysimage/usr/X11R6/lib"
+                libdirs = os.environ["LD_LIBRARY_PATH"].split(":")
+                mounted = map(lambda dir: "/mnt/sysimage%s" % dir, libdirs)
+                os.environ["LD_LIBRARY_PATH"] = ":".join(libdirs + mounted)

                  # find groff data dir

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]