From fe0e92f4e338bd3ab690e409ff9ccde6cfe58780 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 24 Jan 2000 13:11:27 +0000 Subject: first sparc release of DrakX. --- perl-install/fs.pm | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'perl-install/fs.pm') diff --git a/perl-install/fs.pm b/perl-install/fs.pm index f2f3a48de..3920de74b 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -144,11 +144,13 @@ sub mount_part($;$$) { $part->{isMounted} and return; - if (isSwap($part)) { - swap::swapon($part->{device}); - } else { - $part->{mntpoint} or die "missing mount point"; - mount(devices::make($part->{device}), ($prefix || '') . $part->{mntpoint}, type2fs($part->{type}), $rdonly); + unless ($::testing) { + if (isSwap($part)) { + swap::swapon($part->{device}); + } else { + $part->{mntpoint} or die "missing mount point"; + mount(devices::make($part->{device}), ($prefix || '') . $part->{mntpoint}, type2fs($part->{type}), $rdonly); + } } $part->{isMounted} = $part->{isFormatted} = 1; #- assume that if mount works, partition is formatted } @@ -158,9 +160,11 @@ sub umount_part($;$) { $part->{isMounted} or return; - isSwap($part) ? - swap::swapoff($part->{device}) : - umount(($prefix || '') . ($part->{mntpoint} || devices::make($part->{device}))); + unless ($::testing) { + isSwap($part) ? + swap::swapoff($part->{device}) : + umount(($prefix || '') . ($part->{mntpoint} || devices::make($part->{device}))); + } $part->{isMounted} = 0; } -- cgit v1.2.1