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

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

 



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):
                     fd.close()
 
                 # 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
                 try:
-- 
1.6.6.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux