summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2007-07-25 18:02:53 +0000
committerJeremy Katz <katzj@redhat.com>2007-07-25 18:02:53 +0000
commitc5fccc19ec76fd99ca63b38c764fe89360fde092 (patch)
tree3fa9ac027a36a1f863d7c4c4d3ea6a75265e698b /image.py
parent3b392e7ba791a1b4c9c208e6bd895b2d9daad92a (diff)
downloadanaconda-c5fccc19ec76fd99ca63b38c764fe89360fde092.tar.gz
anaconda-c5fccc19ec76fd99ca63b38c764fe89360fde092.tar.xz
anaconda-c5fccc19ec76fd99ca63b38c764fe89360fde092.zip
2007-07-25 Jeremy Katz <katzj@redhat.com>
* fsset.py (allocateLoopback): Use /dev/loopX instead of /tmp/loopX * urlinstall.py (UrlInstallMethod.systemMounted): Use /dev/loop0 instead of /tmp/loop. (UrlInstallMethod.systemUnmounted): Likewise. * rescue.py (runRescue): Loop devices made generally now. * harddrive.py (HardDriveInstallMethod.mountMedia): Use /dev/loop3 instead of /tmp/loop (HardDriveInstallMethod.umountMedia): Likewise. * image.py (CdromInstallMethod.systemUnmounted): Use /dev/loop0 instead of /tmp/loop (CdromInstallMethod.systemMounted): Likewise. (NfsIsoInstallMethod.mountImage): Likewise for /dev/loop3 (NfsIsoInstallMethod.umountImage): Likewise. (findIsoImages): Likewise for /dev/loop2. * iutil.py (makeDriveDeviceNodes): Make loop devices.
Diffstat (limited to 'image.py')
-rw-r--r--image.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/image.py b/image.py
index 4b0af7a7b..4aea6a897 100644
--- a/image.py
+++ b/image.py
@@ -152,8 +152,7 @@ class CdromInstallMethod(ImageInstallMethod):
def systemUnmounted(self):
if self.loopbackFile:
- isys.makeDevInode("loop0", "/tmp/loop")
- isys.lochangefd("/tmp/loop",
+ isys.lochangefd("/dev/loop0",
"%s/images/stage2.img" % (self.tree,))
self.loopbackFile = None
@@ -184,8 +183,7 @@ class CdromInstallMethod(ImageInstallMethod):
os.unlink(self.loopbackFile)
return 1
- isys.makeDevInode("loop0", "/tmp/loop")
- isys.lochangefd("/tmp/loop", self.loopbackFile)
+ isys.lochangefd("/dev/loop0", self.loopbackFile)
def getFilename(self, filename, callback=None, destdir=None, retry=1):
return self.tree + "/" + filename
@@ -398,15 +396,13 @@ def findIsoImages(path, messageWindow):
if not isys.isIsoImage(what):
continue
- isys.makeDevInode("loop2", "/tmp/loop2")
-
try:
- isys.losetup("/tmp/loop2", what, readOnly = 1)
+ isys.losetup("/dev/loop2", what, readOnly = 1)
except SystemError:
continue
try:
- isys.mount("loop2", "/mnt/cdimage", fstype = "iso9660",
+ isys.mount("/dev/loop2", "/mnt/cdimage", fstype = "iso9660",
readOnly = 1)
for num in range(1, 10):
if os.access("/mnt/cdimage/.discinfo", os.R_OK):
@@ -460,8 +456,7 @@ def findIsoImages(path, messageWindow):
except SystemError:
pass
- isys.makeDevInode("loop2", '/tmp/' + "loop2")
- isys.unlosetup("/tmp/loop2")
+ isys.unlosetup("/dev/loop2")
return discImages
@@ -490,8 +485,7 @@ class NfsIsoInstallMethod(NfsInstallMethod):
def umountImage(self):
if self.currentMedia:
isys.umount(self.mntPoint)
- isys.makeDevInode("loop3", "/tmp/loop3")
- isys.unlosetup("/tmp/loop3")
+ isys.unlosetup("/dev/loop3")
self.mntPoint = None
self.currentMedia = []
@@ -504,10 +498,9 @@ class NfsIsoInstallMethod(NfsInstallMethod):
try:
isoImage = self.isoPath + '/' + self.discImages[cdNum]
- isys.makeDevInode("loop3", "/tmp/loop3")
- isys.losetup("/tmp/loop3", isoImage, readOnly = 1)
+ isys.losetup("/dev/loop3", isoImage, readOnly = 1)
- isys.mount("loop3", "/tmp/isomedia", fstype = 'iso9660', readOnly = 1);
+ isys.mount("/dev/loop3", "/tmp/isomedia", fstype = 'iso9660', readOnly = 1);
self.mntPoint = "/tmp/isomedia/"
self.currentMedia = [ cdNum ]