diff options
author | Erik Troan <ewt@redhat.com> | 2000-11-22 16:25:45 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-11-22 16:25:45 +0000 |
commit | b18c6dcc92cd6b710dddb08ab92176103682fd94 (patch) | |
tree | 123050581aba14368923b5acee579247384076f0 /fstab.py | |
parent | cfbe2409c12c79f858ea93a9c3da073d3edc6130 (diff) | |
download | anaconda-b18c6dcc92cd6b710dddb08ab92176103682fd94.tar.gz anaconda-b18c6dcc92cd6b710dddb08ab92176103682fd94.tar.xz anaconda-b18c6dcc92cd6b710dddb08ab92176103682fd94.zip |
make loopback filesystems on partitions that are in the protectList
Diffstat (limited to 'fstab.py')
-rw-r--r-- | fstab.py | 58 |
1 files changed, 32 insertions, 26 deletions
@@ -586,6 +586,37 @@ class Fstab: for (mntpoint, device, fsystem, doFormat, size) in self.mountList(): if not doFormat: continue + + # Handle these before we handle the protect list, as the vfat + # partition itself could be in the protect list. + if fsystem == "vfat" and mntpoint == "/": + # do a magical loopback mount -- whee! + isys.mount(device, "/mnt/loophost", fstype = "vfat") + + isys.makeDevInode("loop1", '/tmp/' + "loop1") + isys.ddfile("/mnt/loophost/redhat.img", self.loopbackSize, + (self.progressWindow, _("Loopback"), + _("Creating loopback filesystem on device /dev/%s...") + % device)) + + isys.losetup("/tmp/loop1", "/mnt/loophost/redhat.img") + + if self.serial: + messageFile = "/tmp/mke2fs.log" + else: + messageFile = "/dev/tty5" + + ext2FormatFilesystem([ "/usr/sbin/mke2fs", "/tmp/loop1" ], + messageFile, self.progressWindow, + mntpoint) + + # don't leave this setup, or we'll get confused later + isys.unlosetup("/tmp/loop1") + isys.umount("/mnt/loophost") + + # Next + continue + if self.protectList: founddev = 0 for i in self.protectList: @@ -593,6 +624,7 @@ class Fstab: founddev = 1 break; if founddev != 0: + # Next continue isys.makeDevInode(device, '/tmp/' + device) @@ -635,32 +667,6 @@ class Fstab: args, stdout = messageFile, stderr = messageFile, searchPath = 1) w.pop() - elif fsystem == "vfat" and mntpoint == "/": - # do a magical loopback mount -- whee! - isys.mount(device, "/mnt/loophost", fstype = "vfat") - - isys.makeDevInode("loop1", '/tmp/' + "loop1") - isys.ddfile("/mnt/loophost/redhat.img", self.loopbackSize, - (self.progressWindow, _("Loopback"), - _("Creating loopback filesystem on device /dev/%s...") - % device)) - - isys.losetup("/tmp/loop1", "/mnt/loophost/redhat.img") - - if self.serial: - messageFile = "/tmp/mke2fs.log" - else: - messageFile = "/dev/tty5" - - ext2FormatFilesystem([ "/usr/sbin/mke2fs", "/tmp/loop1" ], - messageFile, self.progressWindow, - mntpoint) - - # don't leave this setup, or we'll get confused later - isys.unlosetup("/tmp/loop1") - isys.umount("/mnt/loophost") - - w.pop() else: pass |