From e98ee90ad678ead7fa59697092c9511895be10ce Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 21 Aug 2001 15:15:54 +0000 Subject: (read_fstab): don't expand symlink if the link goes in a directory --- perl-install/fs.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 493dc2ca6..d9bba4694 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -42,8 +42,11 @@ sub read_fstab { } if ($dev =~ m,/(tmp|dev)/,) { - $dev = expand_symlinks($dev); - $dev =~ s,/(tmp|dev)/,,; + if (readlink($dev) !~ m|/|) { + $dev = readlink($dev); + } else { + $dev =~ s,/(tmp|dev)/,,; + } } { device => $dev, mntpoint => $mntpoint, type => $type, options => $options }; -- cgit v1.2.1