summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Draklive/Storage.pm
blob: 220d71c94594f95655262e20656d741e9ffe747a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package MDV::Draklive::Storage;

use detect_devices;

our %storage_types = (
    cdrom => {
        modules => 'bus/firewire|usb disk/firewire|hardware_raid|ide|sata|scsi|usb',
        media_modules => 'disk/cdrom',
        fs => 'iso9660',
        can_hide => 0,
        source => 'LABEL=MDVCDROOT',
        read_only => 1,
        detect => \&detect_devices::burners,
        create => \&main::create_cdrom_master,
        format => \&main::format_cdrom_device,
        record_needs_master => 1,
        record => \&main::record_cdrom_master,
        replicator => \&main::create_cdrom_replicator,
    },
    usb => {
        modules => 'bus/usb disk/usb',
        media_modules => 'disk/raw',
        fs => 'vfat',
        can_hide => 1,
        bootloader => 'grub',
        source => 'LABEL=MDVUSBROOT',
        detect => sub { grep { detect_devices::isKeyUsb($_) } detect_devices::get() },
        create => \&main::create_disk_master,
        format => \&main::format_usb_device,
        record => \&main::record_usb_master,
        image => \&main::create_disk_image,
        replicator => \&main::create_usb_replicator,
    },
    harddisk => {
        fs => 'ext3',
        create => \&main::create_disk_master,
        record => \&main::record_harddisk_master,
        image => \&main::create_disk_image,
    },
);

1;