Fix to ensure that we look inside the chroot for /etc/hosts.bck, not on our live...
authorChris Gianelloni <wolf31o2@gentoo.org>
Wed, 22 Mar 2006 22:21:32 +0000 (22:21 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Wed, 22 Mar 2006 22:21:32 +0000 (22:21 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1103 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/generic_stage_target.py

index aa8f09cb39e0debcafdb5dcabb9a9c578ebb04d7..63ce240376fc2729c46903cc5ac6704fde6a29a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.588 2006/03/22 19:11:24 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.589 2006/03/22 22:21:31 wolf31o2 Exp $
+
+  22 Mar 2006; Chris Gianelloni <wolf31o2@gentoo.org>
+  modules/generic_stage_target.py:
+  Fix to ensure that we look inside the chroot for /etc/hosts.bck, not on our
+  live system. You can thank Andrew Gaffney for the fix.
 
   22 Mar 2006; Chris Gianelloni <wolf31o2@gentoo.org>
   targets/livecd-stage2/livecd-stage2-controller.sh:
index dba0adf57ec313767cd586d30fc066fa7d3534e0..0716123d826e60d42f3080f907043de099771ea9 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.129 2006/02/14 15:29:39 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.130 2006/03/22 22:21:32 wolf31o2 Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -867,7 +867,7 @@ class generic_stage_target(generic_target):
                                        "Could not copy envscript into place.",env=self.env)
 
                    # copy over /etc/hosts from the host in case there are any specialties in there
-                       if os.path.exists("/etc/hosts"):
+                       if os.path.exists(self.settings["chroot_path"]+"/etc/hosts"):
                                cmd("mv "+self.settings["chroot_path"]+"/etc/hosts "+self.settings["chroot_path"]+\
                                        "/etc/hosts.bck", "Could not backup /etc/hosts",env=self.env)
                                cmd("cp /etc/hosts "+self.settings["chroot_path"]+"/etc/hosts", "Could not copy /etc/hosts",env=self.env)