diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-06-11 15:26:50 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-06-11 15:26:50 +0000 |
commit | c568684eb583ad5797274cbc521f663ccf1ecd34 (patch) | |
tree | a09a0a148cf74b815bd940baa90dbb6c365e0d3c | |
parent | a59259bcc39b85e55d2d62e465633cddcd9c3f64 (diff) | |
download | draklive-c568684eb583ad5797274cbc521f663ccf1ecd34.tar draklive-c568684eb583ad5797274cbc521f663ccf1ecd34.tar.gz draklive-c568684eb583ad5797274cbc521f663ccf1ecd34.tar.bz2 draklive-c568684eb583ad5797274cbc521f663ccf1ecd34.tar.xz draklive-c568684eb583ad5797274cbc521f663ccf1ecd34.zip |
add a get_media_source_for_nash functions that formats ext2 labels accordingly
-rwxr-xr-x | draklive | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -512,7 +512,7 @@ sub create_initrd_scriptlet { if_($pre, deref_array($pre)), ($fs eq 'nfs' ? '/bin/mount -n -o ro,nolock' : 'mount') . if_(@mount_options, " -o " . join(",", @mount_options)) . - " -t $fs " . get_media_setting($media, 'source') . " $live->{prefix}{live}{mnt}$live->{prefix}{media}{mnt}", + " -t $fs " . get_media_source_for_nash($media, 'source') . " $live->{prefix}{live}{mnt}$live->{prefix}{media}{mnt}", (map { $loop{$_->{type}}{mount}->($live, $_) } @$mount_first, @$mount_last), ($live->{mount}{overlay} ? $overlay{$live->{mount}{overlay}}{mount}->($live) : ()), "echo 0x0100 > /proc/sys/kernel/real-root-dev", @@ -903,6 +903,15 @@ sub get_media_device { $device; } +sub get_media_source_for_nash { + my ($media) = @_; + my $label = get_media_label($media); + #- strip ext2 labels to 11 chars and upper-case it + $label && get_media_setting($media, 'fs') eq 'ext2' ? + 'LABEL=' . uc(substr($label, 0, 11)) : + get_media_setting($media, 'source'); +} + sub prepare_bootloader { my ($live) = @_; create_initrd($live); |