diff options
Diffstat (limited to 'perl-install/fs.pm')
| -rw-r--r-- | perl-install/fs.pm | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm index d4f742da6..f3fcdf188 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -1,4 +1,4 @@ -package fs; # $Id: fs.pm 259325 2009-08-17 12:51:59Z alefebvre $ +package fs; use diagnostics; use strict; @@ -49,27 +49,6 @@ sub read_fstab { $options = 'defaults' if $options eq 'rw'; # clean-up for mtab read - if ($fs_type eq 'supermount') { - log::l("dropping supermount"); - $options = join(",", grep { - if (/fs=(.*)/) { - $fs_type = $1; - - #- with supermount, the type could be something like ext2:vfat - #- but this cannot be done without supermount, so switching to "auto" - $fs_type = 'auto' if $fs_type =~ /:/; - - 0; - } elsif (/dev=(.*)/) { - $dev = $1; - 0; - } elsif ($_ eq '--') { - 0; - } else { - 1; - } - } split(',', $options)); - } s/\\040/ /g foreach $mntpoint, $dev, $options; if ($fs_type eq 'ext4') { @@ -230,7 +209,9 @@ sub prepare_write_fstab { $comment ||= "# Entry for /dev/$_->{device} :\n" if $device =~ /^(UUID|LABEL)=/; my $real_mntpoint = $_->{mntpoint} || ${{ '/tmp/hdimage' => '/mnt/hd' }}{$_->{real_mntpoint}}; - mkdir_p("$o_prefix$real_mntpoint") if $real_mntpoint =~ m|^/|; + if (!member('bind', split(',', $_->{options}))) { + mkdir_p("$o_prefix$real_mntpoint") if $real_mntpoint =~ m|^/|; + } my $mntpoint = fs::type::carry_root_loopback($_) ? '/initrd/loopfs' : $real_mntpoint; my ($freq, $passno) = @@ -319,7 +300,7 @@ sub set_removable_mntpoints { my %names; foreach (@{$all_hds->{raw_hds}}) { my $name = detect_devices::suggest_mount_point($_) or next; - $name eq 'zip' || $name eq 'cdrom' and next; + member($name, qw(zip cdrom)) and next; my $s = ++$names{$name}; $_->{mntpoint} ||= "/media/$name" . ($s == 1 ? '' : $s); |
