From cc61d6c4c26160e9cf3f920ffd02e9b616c3a0d9 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 6 Jun 2003 12:57:51 +0000 Subject: stricter regexp when looking /dev/xxx otherwise it is used also for nfs names and causes havoc --- perl-install/fs.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install/fs.pm') diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 1af9d6910..c01207220 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -77,11 +77,11 @@ sub read_fstab { $dev = $h->{device} = $e->{device}; } } - if ($dev =~ m,/(tmp|dev)/,) { + if ($dev =~ m,^/(tmp|dev)/,) { ($h->{major}, $h->{minor}) = unmakedev((stat "$prefix$dev")[6]); my $symlink = readlink("$prefix$dev"); - $dev =~ s,/(tmp|dev)/,,; + $dev =~ s,^/(tmp|dev)/,,; if ($symlink =~ m|^[^/]+$|) { $h->{device_alias} = $dev; -- cgit v1.2.1