summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-08-21 15:15:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-08-21 15:15:39 +0000
commit6eba4ba8a9ef9c05472c0bb53ac30a9535b123dd (patch)
tree72a2e22f3645cac9ffc7d9d78189ffa2a7f122dc /perl-install
parentcec1f715df85cae91ea97cbfc3612c59b7000829 (diff)
downloaddrakx-6eba4ba8a9ef9c05472c0bb53ac30a9535b123dd.tar
drakx-6eba4ba8a9ef9c05472c0bb53ac30a9535b123dd.tar.gz
drakx-6eba4ba8a9ef9c05472c0bb53ac30a9535b123dd.tar.bz2
drakx-6eba4ba8a9ef9c05472c0bb53ac30a9535b123dd.tar.xz
drakx-6eba4ba8a9ef9c05472c0bb53ac30a9535b123dd.zip
when umount fails, try killing fam and trying again
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 717bbc518..82e1de841 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -761,11 +761,10 @@ sub umount {
$mntpoint =~ s|/$||;
log::l("calling umount($mntpoint)");
- # SYS_umount is not a valid sycall on modern kernels
- (arch() =~ /x86_64/
- ? syscall_('umount2', $mntpoint, 0)
- : syscall_('umount', $mntpoint)
- ) or die \N("error unmounting %s: %s", $mntpoint, $!);
+ syscall_('umount2', $mntpoint, 0) or do {
+ kill 15, fuzzy_pidofs('^fam\b');
+ syscall_('umount2', $mntpoint, 0) or die \N("error unmounting %s: %s", $mntpoint, $!);
+ };
substInFile { $_ = '' if /(^|\s)$mntpoint\s/ } '/etc/mtab'; #- don't care about error, if we can't read, we won't manage to write... (and mess mtab)
}