summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-21 15:15:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-21 15:15:54 +0000
commite98ee90ad678ead7fa59697092c9511895be10ce (patch)
treefd8e1a81e842ca781fb3e15b6d91c854868c3700
parent070210c1e1e4785b38f561f45a4cedc1e15d354f (diff)
downloaddrakx-backup-do-not-use-e98ee90ad678ead7fa59697092c9511895be10ce.tar
drakx-backup-do-not-use-e98ee90ad678ead7fa59697092c9511895be10ce.tar.gz
drakx-backup-do-not-use-e98ee90ad678ead7fa59697092c9511895be10ce.tar.bz2
drakx-backup-do-not-use-e98ee90ad678ead7fa59697092c9511895be10ce.tar.xz
drakx-backup-do-not-use-e98ee90ad678ead7fa59697092c9511895be10ce.zip
(read_fstab): don't expand symlink if the link goes in a directory
-rw-r--r--perl-install/fs.pm7
1 files changed, 5 insertions, 2 deletions
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 };