From a0af06516522c49497543443273552c00d08262a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 4 Sep 2001 16:38:14 +0000 Subject: - don't expand symlinks in grub's menu.lst - better use of /proc/partitions verification --- perl-install/common.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'perl-install/common.pm') diff --git a/perl-install/common.pm b/perl-install/common.pm index e08f754ee..8d8ab40dd 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -116,6 +116,17 @@ sub formatTime { sub usingRamdisk { scalar(grep { /ram3/ } cat_("/proc/mounts")) } +sub expand_symlinks_but_simple { + my ($f) = @_; + my $link = readlink($f); + my $f2 = expand_symlinks($f); + if ($link && $link !~ m|/|) { + # put back the last simple symlink + $f2 =~ s|\Q$link\E$|basename($f)|e; + } + $f2 +} + sub sync { &MDK::Common::System::sync } #-###################################################################################### -- cgit v1.2.1