diff options
author | Chris Lumens <clumens@redhat.com> | 2007-12-13 14:37:28 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2007-12-13 14:37:28 -0500 |
commit | 63b3830f6ae399469484836780594fd179e5e1d5 (patch) | |
tree | 0608762010e37137de2051eda234ebe560cad622 /fsset.py | |
parent | 3da2812cce93d3f3ba18c6cb2a2ae2263c06ad3e (diff) | |
download | anaconda-63b3830f6ae399469484836780594fd179e5e1d5.tar.gz anaconda-63b3830f6ae399469484836780594fd179e5e1d5.tar.xz anaconda-63b3830f6ae399469484836780594fd179e5e1d5.zip |
Create full paths before trying to make device nodes.
Diffstat (limited to 'fsset.py')
-rw-r--r-- | fsset.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1946,17 +1946,24 @@ MAILADDR root rc = lvm.vgmknodes() rootDev = "/dev/%s" % (root.device.getDevice(),) - rootdir = instPath + rootDev[:string.rfind(rootDev, "/")] + rootdir = instPath + os.path.dirname(rootDev) if not os.path.isdir(rootdir): os.makedirs(rootdir) + dmdev = "/dev/mapper/" + root.device.getDevice().replace("/", "-") if os.path.exists(instPath + dmdev): os.unlink(instPath + dmdev) + if not os.path.isdir(os.path.dirname(instPath + dmdev)): + os.makedirs(os.path.dirname(instPath + dmdev)) iutil.copyDeviceNode(dmdev, instPath + dmdev) + # unlink existing so that we dtrt on upgrades if os.path.exists(instPath + rootDev): os.unlink(instPath + rootDev) + if not os.path.isdir(rootdir): + os.makedirs(rootdir) os.symlink(dmdev, instPath + rootDev) + if not os.path.isdir("%s/etc/lvm" %(instPath,)): os.makedirs("%s/etc/lvm" %(instPath,)) |