diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-10-28 20:54:33 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-10-28 20:54:33 +0000 |
commit | ef64a367150c060b49b163db3a4383e68d3d3265 (patch) | |
tree | 544f6c3e1c659055ca316213c3df170d9d1af354 | |
parent | b0922dab94b1d940bcac87cabed5bca33608e082 (diff) | |
download | drakiso-ef64a367150c060b49b163db3a4383e68d3d3265.tar drakiso-ef64a367150c060b49b163db3a4383e68d3d3265.tar.gz drakiso-ef64a367150c060b49b163db3a4383e68d3d3265.tar.bz2 drakiso-ef64a367150c060b49b163db3a4383e68d3d3265.tar.xz drakiso-ef64a367150c060b49b163db3a4383e68d3d3265.zip |
move get_media_source_for_nash as method in MDV::Draklive::Media
-rwxr-xr-x | draklive | 15 | ||||
-rw-r--r-- | lib/MDV/Draklive/Media.pm | 9 |
2 files changed, 12 insertions, 12 deletions
@@ -188,14 +188,14 @@ my %storage_fs; grep { $_ } $media->get_media_setting('mount_options'), ); 'nash-mount' . if_(@mount_options, " -o " . join(",", @mount_options)) . " -t " . $media->get_media_setting('fs') . - " " . get_media_source_for_nash($media) . " $live->{prefix}{live}{mnt}$live->{prefix}{media}{mnt}"; + " " . $media->get_media_source_for_nash . " $live->{prefix}{live}{mnt}$live->{prefix}{media}{mnt}"; }, }, nfs => { files => [ '/sbin/ifconfig', '/bin/mount' ], #- needed to mount NFS (with nolock) mount => sub { my ($live, $media) = @_; - '/bin/mount -n -o ro,nolock -t nfs ' . get_media_source_for_nash($media) . " $live->{prefix}{live}{mnt}$live->{prefix}{media}{mnt}"; + '/bin/mount -n -o ro,nolock -t nfs ' . $media->get_media_source_for_nash . " $live->{prefix}{live}{mnt}$live->{prefix}{media}{mnt}"; } }, ext2 => { @@ -646,7 +646,7 @@ sub get_default_append { my ($live, $opts) = @_; join(' ', if_(!need_media_specific_boot($live), - 'root=' . get_media_source_for_nash($live->{media})), + 'root=' . $live->{media}->get_media_source_for_nash), if_($live->{system}{vga_mode}, 'splash=silent', 'vga=' . $live->{system}{vga_mode}), @@ -1037,15 +1037,6 @@ sub get_media_prefix { $live->{prefix}{media}{$hidden ? "hidden_$setting" : $setting}; } -sub get_media_source_for_nash { - my ($media) = @_; - my $label = $media->get_media_label; - #- strip vfat labels to 11 chars and upper-case it - $label && $media->get_media_setting('fs') eq 'vfat' ? - 'LABEL=' . uc(substr($label, 0, 11)) : - $media->get_media_setting('source'); -} - sub prepare_bootloader { my ($live) = @_; create_initrd($live); diff --git a/lib/MDV/Draklive/Media.pm b/lib/MDV/Draklive/Media.pm index 0e3e738..76188d8 100644 --- a/lib/MDV/Draklive/Media.pm +++ b/lib/MDV/Draklive/Media.pm @@ -36,4 +36,13 @@ sub get_media_label { first($media->get_media_setting('source') =~ /^LABEL=(.*)$/); } +sub get_media_source_for_nash { + my ($media) = @_; + my $label = $media->get_media_label; + #- strip vfat labels to 11 chars and upper-case it + $label && $media->get_media_setting('fs') eq 'vfat' ? + 'LABEL=' . uc(substr($label, 0, 11)) : + $media->get_media_setting('source'); +} + 1; |