diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-09-07 03:43:21 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-09-07 03:43:21 +0000 |
commit | cd5c16317526078d499b2c534b1a302043f762f4 (patch) | |
tree | 433d3aee77227379f91fe2f6d85bdf8464e512ec | |
parent | e9bd3e32ccd2be144d112cc728249d0f53c2470b (diff) | |
download | drakx-cd5c16317526078d499b2c534b1a302043f762f4.tar drakx-cd5c16317526078d499b2c534b1a302043f762f4.tar.gz drakx-cd5c16317526078d499b2c534b1a302043f762f4.tar.bz2 drakx-cd5c16317526078d499b2c534b1a302043f762f4.tar.xz drakx-cd5c16317526078d499b2c534b1a302043f762f4.zip |
- ignore first line of /proc/swaps
- partially handle /udev/xxx device names in fstab
- ignore rootfs "device"
- don't warn for loopback files
-rw-r--r-- | perl-install/fs.pm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm index f73182941..8b0a58e74 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -29,7 +29,9 @@ sub read_fstab { my %comments; my $comment; my @l = grep { - if (/^\s*#/) { + if (/^Filename\s*Type\s*Size/) { + 0; #- when reading /proc/swaps + } elsif (/^\s*#/) { $comment .= chomp_($_) . "\n"; 0; } else { @@ -130,6 +132,7 @@ sub subpart_from_wild_device_name { if ($dev =~ /^LABEL=(.*)/) { return { device_LABEL => $1 }; } elsif ($dev eq 'none') { + } elsif ($dev eq 'rootfs') { } elsif ($dev =~ m!^(\S+):/\w!) { #- nfs } elsif ($dev =~ m!^//\w!) { @@ -140,7 +143,7 @@ sub subpart_from_wild_device_name { if ($dev !~ m!^/! && -e "$::prefix/dev/$dev") { $dev = "/dev/$dev"; } - if ($dev =~ m!^/(tmp|dev)/(.*)!) { + if ($dev =~ m!^/(tmp|u?dev)/(.*)!) { my %part; if (my $rdev = (stat "$::prefix$dev")[6]) { ($part{major}, $part{minor}) = unmakedev($rdev); @@ -152,11 +155,13 @@ sub subpart_from_wild_device_name { $dev = $symlink; } } - $dev =~ s!/(tmp|dev)/!!; + $dev =~ s!/(tmp|u?dev)/!!; my $is_devfs = $dev =~ m!/(disc|part\d+)$!; $part{$is_devfs ? 'devfs_device' : 'device'} = $dev; return \%part; + } elsif ($dev =~ m!^/! && -f "$::prefix$dev") { + #- loopback file } else { log::l("part_from_wild_device_name: unknown device $dev"); } |