diff options
author | Peter Jones <pjones@redhat.com> | 2006-02-01 21:40:17 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2006-02-01 21:40:17 +0000 |
commit | 7ca470f0abc77a5f674a5b05469d35d9a94d0721 (patch) | |
tree | 84ef1a496f55e9bc359003cc15b0aa1f606a0da8 | |
parent | 8d77d78ed918263f3a1ea717aa1736535efd83fa (diff) | |
download | anaconda-7ca470f0abc77a5f674a5b05469d35d9a94d0721.tar.gz anaconda-7ca470f0abc77a5f674a5b05469d35d9a94d0721.tar.xz anaconda-7ca470f0abc77a5f674a5b05469d35d9a94d0721.zip |
- add code to make /dev/root as it would be in a non-install environment
(#171662)
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | fsset.py | 14 | ||||
-rw-r--r-- | upgrade.py | 3 | ||||
-rw-r--r-- | yuminstall.py | 3 |
4 files changed, 25 insertions, 4 deletions
@@ -1,3 +1,12 @@ +2006-02-01 Peter Jones <pjones@redhat.com> + + * fsset.py (FileSystemSet): add a method to make /dev/root as it + would be outside of the install environment (#171662) + + * upgrade.py (upgradeMountFilesystems): make /dev/root + + * yuminstall.py (doPreInstall): make /dev/root + 2006-02-01 David Cantrell <dcantrell@redhat.com> * fsset.py (swapFileSystem.labelDevice): Make swap labels starting @@ -3,7 +3,7 @@ # # Matt Wilson <msw@redhat.com> # -# Copyright 2001-2002 Red Hat, Inc. +# Copyright 2001-2006 Red Hat, Inc. # # This software may be freely redistributed under the terms of the GNU # library public license. @@ -18,6 +18,7 @@ import isys import iutil import os import posix +import stat import errno import parted import sys @@ -1270,7 +1271,16 @@ MAILADDR root f.write(newline) f.close() - + + def mkDevRoot(self, instPath): + import pdb + pdb.set_trace() + root = self.getEntryByMountPoint("/") + dev = "%s/dev/%s" % (instPath, root.device.getDevice()) + rdev = os.stat(dev).st_rdev + + os.mknod("%s/dev/root" % (instPath,), stat.S_IFBLK | 0600, rdev) + # return the "boot" device def getBootDev(self): mntDict = {} diff --git a/upgrade.py b/upgrade.py index 924f33edd..5e9df76c8 100644 --- a/upgrade.py +++ b/upgrade.py @@ -3,7 +3,7 @@ # # Matt Wilson <msw@redhat.com> # -# Copyright 2001-2003 Red Hat, Inc. +# Copyright 2001-2006 Red Hat, Inc. # # This software may be freely redistributed under the terms of the GNU # library public license. @@ -337,6 +337,7 @@ def upgradeMountFilesystems(intf, rootInfo, oldfsset, instPath): if flags.setupFilesystems: oldfsset.turnOnSwap(instPath, upgrading=True) + oldfsset.mkDevRoot(instPath) # move the old pre-convert db back in case of problems def resetRpmdb(olddb, instPath): diff --git a/yuminstall.py b/yuminstall.py index 3e12a2d4f..0b96102cc 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2005 Red Hat, Inc. +# Copyright (c) 2005-2006 Red Hat, Inc. # # This software may be freely redistributed under the terms of the GNU # general public license. @@ -843,6 +843,7 @@ class YumBackend(AnacondaBackend): if 1: log.warning("no dev package, going to bind mount /dev") isys.mount("/dev", "/mnt/sysimage/dev", bindMount = 1) + id.fsset.mkDevRoot("/mnt/sysimage/") # write out the fstab if not upgrade: |