fbcaed
From 7c4f34a595372b752c8140d25bf503af1222153c Mon Sep 17 00:00:00 2001
fbcaed
From: "Brian C. Lane" <bcl@redhat.com>
fbcaed
Date: Tue, 11 Mar 2014 14:34:12 -0700
fbcaed
Subject: [PATCH 03/20] Use ROOT_PATH not /mnt/sysimage
fbcaed
fbcaed
Cleanup a couple places that were using /mnt/sysimage instead of
fbcaed
ROOT_PATH from constants.
fbcaed
fbcaed
Resolves: rhbz#1113535
fbcaed
Port of rpmostreepayload patches from master
fbcaed
commit 1ea3a19565d92d3a1077a7beeb2f369c76ed8b8d
fbcaed
---
fbcaed
 pyanaconda/exception.py | 8 ++++----
fbcaed
 pyanaconda/users.py     | 6 +++---
fbcaed
 2 files changed, 7 insertions(+), 7 deletions(-)
fbcaed
fbcaed
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
fbcaed
index ed434a7..861425f 100644
fbcaed
--- a/pyanaconda/exception.py
fbcaed
+++ b/pyanaconda/exception.py
fbcaed
@@ -158,13 +158,13 @@ class AnacondaExceptionHandler(ExceptionHandler):
fbcaed
     def postWriteHook(self, dump_info):
fbcaed
         anaconda = dump_info.object
fbcaed
 
fbcaed
-        # See if /mnt/sysimage is present and put exception there as well
fbcaed
-        if os.access("/mnt/sysimage/root", os.X_OK):
fbcaed
+        # See if there is a /root present in the root path and put exception there as well
fbcaed
+        if os.access(ROOT_PATH + "/root", os.X_OK):
fbcaed
             try:
fbcaed
-                dest = "/mnt/sysimage/root/%s" % os.path.basename(self.exnFile)
fbcaed
+                dest = ROOT_PATH + "/root/%s" % os.path.basename(self.exnFile)
fbcaed
                 shutil.copyfile(self.exnFile, dest)
fbcaed
             except:
fbcaed
-                log.error("Failed to copy %s to /mnt/sysimage/root" % self.exnFile)
fbcaed
+                log.error("Failed to copy %s to %s/root" % (self.exnFile, ROOT_PATH))
fbcaed
                 pass
fbcaed
 
fbcaed
         # run kickstart traceback scripts (if necessary)
fbcaed
diff --git a/pyanaconda/users.py b/pyanaconda/users.py
fbcaed
index d43ad29..9e09be0 100644
fbcaed
--- a/pyanaconda/users.py
fbcaed
+++ b/pyanaconda/users.py
fbcaed
@@ -192,7 +192,7 @@ class Users:
fbcaed
         """
fbcaed
 
fbcaed
         childpid = os.fork()
fbcaed
-        root = kwargs.get("root", "/mnt/sysimage")
fbcaed
+        root = kwargs.get("root", ROOT_PATH)
fbcaed
 
fbcaed
         if not childpid:
fbcaed
             if not root in ["","/"]:
fbcaed
@@ -258,7 +258,7 @@ class Users:
fbcaed
                         available one is used.
fbcaed
         """
fbcaed
         childpid = os.fork()
fbcaed
-        root = kwargs.get("root", "/mnt/sysimage")
fbcaed
+        root = kwargs.get("root", ROOT_PATH)
fbcaed
 
fbcaed
         if not childpid:
fbcaed
             if not root in ["","/"]:
fbcaed
@@ -358,7 +358,7 @@ class Users:
fbcaed
         else:
fbcaed
             return False
fbcaed
 
fbcaed
-    def checkUserExists(self, username, root="/mnt/sysimage"):
fbcaed
+    def checkUserExists(self, username, root=ROOT_PATH):
fbcaed
         childpid = os.fork()
fbcaed
 
fbcaed
         if not childpid:
fbcaed
-- 
fbcaed
1.9.3
fbcaed