From 6eba4ba8a9ef9c05472c0bb53ac30a9535b123dd Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 21 Aug 2003 15:15:39 +0000 Subject: when umount fails, try killing fam and trying again --- perl-install/fs.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'perl-install/fs.pm') 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) } -- cgit v1.2.1