summaryrefslogtreecommitdiffstats
path: root/lib/MGA/DrakISO/Storage.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MGA/DrakISO/Storage.pm')
-rw-r--r--lib/MGA/DrakISO/Storage.pm54
1 files changed, 54 insertions, 0 deletions
diff --git a/lib/MGA/DrakISO/Storage.pm b/lib/MGA/DrakISO/Storage.pm
new file mode 100644
index 0000000..6402cd2
--- /dev/null
+++ b/lib/MGA/DrakISO/Storage.pm
@@ -0,0 +1,54 @@
+package MGA::DrakISO::Storage;
+
+use detect_devices;
+
+our %storage_types = (
+ iso => {
+ modules => 'bus/firewire|usb disk/firewire|hardware_raid|ide|sata|scsi|usb',
+ fs => 'iso9660',
+ source => 'LABEL=MGAISOROOT',
+ read_only => 1,
+ create => \&main::create_iso_master,
+ },
+ cdrom => {
+ modules => 'bus/firewire|usb disk/firewire|hardware_raid|ide|sata|scsi|usb',
+ media_modules => 'disk/cdrom',
+ fs => 'iso9660',
+ can_hide => 0,
+ source => 'LABEL=MGACDROOT',
+ 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,
+ record_replicator => \&main::record_cdrom_replicator,
+ },
+ usb => {
+ modules => 'bus/usb disk/usb',
+ media_modules => 'disk/raw',
+ fs => 'vfat',
+ can_hide => 1,
+ bootloader => 'grub',
+ source => 'LABEL=MGAUSBROOT',
+ detect => sub { grep { detect_devices::isKeyUsb($_) } detect_devices::get() },
+ create => \&main::create_disk_master,
+ format => \&main::format_disk,
+ record => \&main::record_usb_master,
+ image => \&main::create_disk_image,
+ replicator => \&main::create_usb_replicator,
+ record_replicator => \&main::record_usb_replicator,
+ },
+ harddisk => {
+ fs => 'ext4',
+ bootloader => 'grub',
+ source => 'LABEL=MGAROOT',
+ create => \&main::create_disk_master,
+ format => \&main::format_disk,
+ record => \&main::record_harddisk_master,
+ image => \&main::create_disk_image,
+ },
+);
+
+1;