summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Draklive/Media.pm
blob: e3fa1ac74d2e54a716a6e04751e2c247f401933a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package MDV::Draklive::Media;

sub get_initrd_path {
    my ($media) = @_;
    '/' . $media->{storage} . '/initrd.gz';
}

#- mainly for storage-specific subroutines
sub get_storage_setting {
    my ($media, $setting) = @_;
    $storage{$media->{storage}}{$setting};
}

#- for actions that support an optional boot storage type
sub get_boot_setting {
    my ($media, $setting, $opts) = @_;
    $opts->{boot} ? $storage{$opts->{boot}}{$setting} : get_media_setting($media, $setting);
}

1;