summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-09-04 16:38:14 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-09-04 16:38:14 +0000
commita0af06516522c49497543443273552c00d08262a (patch)
tree57b2d139327eec6f94061c97f00e5df44e4f2ca3 /perl-install/common.pm
parent9464e90e0fc14b8e7d7585e1600ac97e502fdb01 (diff)
downloaddrakx-backup-do-not-use-a0af06516522c49497543443273552c00d08262a.tar
drakx-backup-do-not-use-a0af06516522c49497543443273552c00d08262a.tar.gz
drakx-backup-do-not-use-a0af06516522c49497543443273552c00d08262a.tar.bz2
drakx-backup-do-not-use-a0af06516522c49497543443273552c00d08262a.tar.xz
drakx-backup-do-not-use-a0af06516522c49497543443273552c00d08262a.zip
- don't expand symlinks in grub's menu.lst
- better use of /proc/partitions verification
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm11
1 files changed, 11 insertions, 0 deletions
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 }
#-######################################################################################