From 784aa828dab0fb88db1ed861d9c6a66c40705f31 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Wed, 22 Mar 2006 22:21:32 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1103 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 7 ++++++- modules/generic_stage_target.py | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index aa8f09cb..63ce2403 100644 --- 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 + 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 targets/livecd-stage2/livecd-stage2-controller.sh: diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index dba0adf5..0716123d 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -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) -- 2.26.2