Example #1
0
    def exceptionDisks(self):
        """ Return a list of removable devices to save exceptions to.

        """
        # When a usb is connected from before the start of the installation,
        # it is not correctly detected.
        udev_trigger(subsystem="block", action="change")
        self.reset()

        dests = []

        for disk in self.disks:
            if not disk.removable and \
                    disk.format is not None  and \
                    disk.format.mountable:
                dests.append([disk.path, disk.name])

        for part in self.partitions:
            if not part.disk.removable:
                continue

            elif part.partedPartition.active and \
                    not part.partedPartition.getFlag(parted.PARTITION_RAID) and \
                    not part.partedPartition.getFlag(parted.PARTITION_LVM) and \
                    part.format is not None and part.format.mountable:
                dests.append([part.path, part.name])

        return dests
Example #2
0
    def exceptionDisks(self):
        """ Return a list of removable devices to save exceptions to.

        """
        # When a usb is connected from before the start of the installation,
        # it is not correctly detected.
        udev_trigger(subsystem="block", action="change")
        self.reset()

        dests = []

        for disk in self.disks:
            if not disk.removable and \
                    disk.format is not None  and \
                    disk.format.mountable:
                dests.append([disk.path, disk.name])

        for part in self.partitions:
            if not part.disk.removable:
                continue

            elif part.partedPartition.active and \
                    not part.partedPartition.getFlag(parted.PARTITION_RAID) and \
                    not part.partedPartition.getFlag(parted.PARTITION_LVM) and \
                    part.format is not None and part.format.mountable:
                dests.append([part.path, part.name])

        return dests
Example #3
0
def initialize(storage, intf):
    storage.shutdown()
    # touch /dev/.in_sysinit so that /lib/udev/rules.d/65-md-incremental.rules
    # does not mess with any mdraid sets
    open("/dev/.in_sysinit", "w")
    udev_trigger(subsystem="block", action="change")
    lvm.lvm_vg_blacklist = []
    storage.reset()

    check = storage.checkDisks(intf)
    if check == None:
        sys.exit(2)
    else:
        return check
Example #4
0
def initialize(storage, intf):
    storage.shutdown()
    # touch /dev/.in_sysinit so that /lib/udev/rules.d/65-md-incremental.rules
    # does not mess with any mdraid sets
    open("/dev/.in_sysinit", "w")
    udev_trigger(subsystem="block", action="change")
    lvm.lvm_vg_blacklist = []
    storage.reset()

    check = storage.checkDisks(intf)
    if check == None:
        sys.exit(2)
    else:
        return check
Example #5
0
def storageInitialize():
    storage.shutdown()
    udev_trigger(subsystem="block", action="change")
    ctx.interface.resetInitializeDiskQuestion()
    ctx.interface.resetReinitInconsistentLVMQuestion()

    ctx.interface.resetInitializeDisk()
    ctx.interface.resetReinitInconsistentLVMQuestion()
    lvm.lvm_vg_blacklist = []
    storage.reset()

    if not storage.disks:
        rc = ctx.interface.messageWindow(_("No disks found"),
                                         _("No usable disks have been found."),
                                         type="custom",
                                         customButtons=[_("Back"), _("Exit installer")],
                                         default=0)
        if rc == 0:
            ctx.mainScreen.slotBack()
        else:
            sys.exit(1)