summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-12-13 14:37:28 -0500
committerChris Lumens <clumens@redhat.com>2007-12-13 14:37:28 -0500
commit63b3830f6ae399469484836780594fd179e5e1d5 (patch)
tree0608762010e37137de2051eda234ebe560cad622 /fsset.py
parent3da2812cce93d3f3ba18c6cb2a2ae2263c06ad3e (diff)
downloadanaconda-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.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/fsset.py b/fsset.py
index 04332806f..180922f04 100644
--- a/fsset.py
+++ b/fsset.py
@@ -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,))